提交 b1443ac0 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

usb: gadget: dummy_hcd: signedness bug in transfer()

"len" is unsigned so it's never less than zero.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6ef1a927
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册