git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
[pandora-kernel.git]
/
drivers
/
usb
/
gadget
/
fsl_qe_udc.c
diff --git
a/drivers/usb/gadget/fsl_qe_udc.c
b/drivers/usb/gadget/fsl_qe_udc.c
index
2a03e4d
..
4e2b5a9
100644
(file)
--- a/
drivers/usb/gadget/fsl_qe_udc.c
+++ b/
drivers/usb/gadget/fsl_qe_udc.c
@@
-1883,11
+1883,8
@@
static int qe_get_frame(struct usb_gadget *gadget)
tmp = in_be16(&udc_controller->usb_param->frame_n);
if (tmp & 0x8000)
tmp = in_be16(&udc_controller->usb_param->frame_n);
if (tmp & 0x8000)
- tmp = tmp & 0x07ff;
- else
- tmp = -EINVAL;
-
- return (int)tmp;
+ return tmp & 0x07ff;
+ return -EINVAL;
}
/* Tries to wake up the host connected to this gadget
}
/* Tries to wake up the host connected to this gadget
@@
-2336,8
+2333,7
@@
static int fsl_qe_start(struct usb_gadget_driver *driver,
if (!udc_controller)
return -ENODEV;
if (!udc_controller)
return -ENODEV;
- if (!driver || (driver->speed != USB_SPEED_FULL
- && driver->speed != USB_SPEED_HIGH)
+ if (!driver || driver->speed < USB_SPEED_FULL
|| !bind || !driver->disconnect || !driver->setup)
return -EINVAL;
|| !bind || !driver->disconnect || !driver->setup)
return -EINVAL;