[PATCHv2 2/2] ttusbir: avoid unnecessary usb_unlink_urb()

Oliver Neukum
2022-05-12T13:41:54Z

While the completion handler is running,
usb_unlink_urb(9 on yourself is a NOP. Remove it.

v2: Resending due to typo in CC

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/media/rc/ttusbir.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c
index a8009dc958be..560a26f3965c 100644
--- a/drivers/media/rc/ttusbir.c
+++ b/drivers/media/rc/ttusbir.c
@@ -90,7 +90,6 @@ static void ttusbir_bulk_complete(struct urb *urb)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- usb_unlink_urb(urb);
return;
case -EPIPE:
default:
@@ -166,7 +165,6 @@ static void ttusbir_urb_complete(struct urb *urb)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- usb_unlink_urb(urb);
return;
case -EPIPE:
default:
--
2.35.3