summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-02 21:51:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-02 16:22:11 -0800
commitb1443ac0e486842c133b8805ee035ab3ff918763 (patch)
treece08d4682ca61e901562a549485335918d4a57b1 /drivers/usb/gadget
parent6ef1a9276be455c114c000ef3d43666cb6ded371 (diff)
downloadblackbird-op-linux-b1443ac0e486842c133b8805ee035ab3ff918763.tar.gz
blackbird-op-linux-b1443ac0e486842c133b8805ee035ab3ff918763.zip
usb: gadget: dummy_hcd: signedness bug in transfer()
"len" is unsigned so it's never less than zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 8cc1a88d21e7..e1cd56c5e2a8 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1352,7 +1352,7 @@ top:
len = dummy_perform_transfer(urb, req, len);
ep->last_io = jiffies;
- if (len < 0) {
+ if ((int)len < 0) {
req->req.status = len;
} else {
limit -= len;
OpenPOWER on IntegriCloud