Skip to contentSkip to conversation

iguanair: no superfluous usb_unlink_urb()

PATCH Applied Oliver Neukum 2 participants 2 messages May 12, 2022 – May 13, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iguanair: no superfluous usb_unlink_urb()

Unlinking yourself while the completion handler
is running is a NOP. Drop it.

---
 drivers/media/rc/iguanair.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/media/rc/iguanair.c +1 -4
index c9cb8277723f..276bf3c8a8cb 100644
@@ -149,10 +149,8 @@ static void iguanair_rx(struct urb *urb)
 		return;
 
 	ir = urb->context;
-	if (!ir) {
-		usb_unlink_urb(urb);
+	if (!ir)
 		return;
-	}
 
 	switch (urb->status) {
 	case 0:
@@ -161,7 +159,6 @@ static void iguanair_rx(struct urb *urb)
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ESHUTDOWN:
-		usb_unlink_urb(urb);
 		return;
 	case -EPIPE:
 	default:
Signature · 1 line
2.35.3
maintainer Applied
#1 lore raw
Quoted 2 lines · Oliver Neukum

Unlinking yourself while the completion handler
is running is a NOP. Drop it.

Applied, thanks!

Sean

Quoted 32 lines
---
 drivers/media/rc/iguanair.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/media/rc/iguanair.c +1 -4
index c9cb8277723f..276bf3c8a8cb 100644
@@ -149,10 +149,8 @@ static void iguanair_rx(struct urb *urb)
 		return;
 
 	ir = urb->context;
-	if (!ir) {
-		usb_unlink_urb(urb);
+	if (!ir)
 		return;
-	}
 
 	switch (urb->status) {
 	case 0:
@@ -161,7 +159,6 @@ static void iguanair_rx(struct urb *urb)
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ESHUTDOWN:
-		usb_unlink_urb(urb);
 		return;
 	case -EPIPE:
 	default:
Signature · 1 line
2.35.3