* [patch] usb: gadget: dummy_hcd: signedness bug in transfer()
@ 2012-03-02 18:51 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-03-02 18:51 UTC (permalink / raw)
To: kernel-janitors
"len" is unsigned so it's never less than zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 8cc1a88..e1cd56c 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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-02 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 18:51 [patch] usb: gadget: dummy_hcd: signedness bug in transfer() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).