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>
This commit is contained in:
Dan Carpenter 2012-03-02 21:51:00 +03:00 committed by Greg Kroah-Hartman
parent 6ef1a9276b
commit b1443ac0e4

View 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;