Commit 92f46151 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: ir_toy: do not resubmit broken urb

This causes the same urb to resubmitted continuously, hogging up a cpu.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 1d37c854
......@@ -213,10 +213,20 @@ static void irtoy_in_callback(struct urb *urb)
struct irtoy *irtoy = urb->context;
int ret;
if (urb->status == 0)
switch (urb->status) {
case 0:
irtoy_response(irtoy, urb->actual_length);
else
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
case -EPROTO:
case -EPIPE:
usb_unlink_urb(urb);
return;
default:
dev_dbg(irtoy->dev, "in urb status: %d\n", urb->status);
}
ret = usb_submit_urb(urb, GFP_ATOMIC);
if (ret && ret != -ENODEV)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment