From b1443ac0e486842c133b8805ee035ab3ff918763 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 2 Mar 2012 21:51:00 +0300 Subject: [PATCH] usb: gadget: dummy_hcd: signedness bug in transfer() "len" is unsigned so it's never less than zero. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/dummy_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5