Skip to content

Commit b98d500

Browse files
oneukummchehab
authored andcommitted
media: rc: iguanair: handle timeouts
In case of a timeout the IO must be cancelled or the next IO using the URB will fail and/or overwrite an operational URB. The automatic bisection fails because it arrives at a commit that correctly lets the test case run without an error. Signed-off-by: Oliver Neukum <[email protected]> Fixes: e99a7cf ("[media] iguanair: reuse existing urb callback for command responses") Reported-by: [email protected] Closes: https://lore.kernel.org/all/[email protected]/ Tested-by: [email protected] Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent ff8f969 commit b98d500

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/media/rc/iguanair.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ static int iguanair_send(struct iguanair *ir, unsigned size)
194194
if (rc)
195195
return rc;
196196

197-
if (wait_for_completion_timeout(&ir->completion, TIMEOUT) == 0)
197+
if (wait_for_completion_timeout(&ir->completion, TIMEOUT) == 0) {
198+
usb_kill_urb(ir->urb_out);
198199
return -ETIMEDOUT;
200+
}
199201

200202
return rc;
201203
}

0 commit comments

Comments
 (0)