usb: gadget: dummy_hcd: signedness bug in transfer()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 2 Mar 2012 18:51:00 +0000 (21:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2012 00:22:11 +0000 (16:22 -0800)
"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>
drivers/usb/gadget/dummy_hcd.c

index 8cc1a88..e1cd56c 100644 (file)
@@ -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;