Skip to content

Commit

Permalink
usb: gadget: dummy_hcd: signedness bug in transfer()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 3, 2012
1 parent 6ef1a92 commit b1443ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/dummy_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ static int transfer(struct dummy_hcd *dum_hcd, struct urb *urb,
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;
Expand Down

0 comments on commit b1443ac

Please sign in to comment.