projects
/
linux-2.6-block.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()
[linux-2.6-block.git]
/
drivers
/
usb
/
gadget
/
udc
/
fsl_qe_udc.c
diff --git
a/drivers/usb/gadget/udc/fsl_qe_udc.c
b/drivers/usb/gadget/udc/fsl_qe_udc.c
index cf8819a5c5b263610eae75cf2066a6f1471b417e..8bb011ea78f7df483f23a0325fc082f36fb8b900 100644
(file)
--- a/
drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/
drivers/usb/gadget/udc/fsl_qe_udc.c
@@
-1878,11
+1878,8
@@
static int qe_get_frame(struct usb_gadget *gadget)
tmp = in_be16(&udc->usb_param->frame_n);
if (tmp & 0x8000)
- tmp = tmp & 0x07ff;
- else
- tmp = -EINVAL;
-
- return (int)tmp;
+ return tmp & 0x07ff;
+ return -EINVAL;
}
static int fsl_qe_start(struct usb_gadget *gadget,