Skip to contentSkip to conversation

Staging: winbond: usb_free_urb(NULL) is safe

PATCH In review Harsh Kumar 2 participants 2 messages Sep 26, 2012 – Sep 28, 2012

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

PATCH 5/5 Staging: winbond: usb_free_urb(NULL) is safe

usb_free_urb(NULL) is safe. So, the check was removed.

---
 drivers/staging/winbond/wb35tx.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/staging/winbond/wb35tx.c +2 -5
diff -uprN a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
@@ -170,11 +170,8 @@ void Wb35Tx_destroy(struct hw_data *pHwD
 	} while ((pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP));
 	msleep(10); /* Delay for waiting function enter 940623.1.b */
 
-	if (pWb35Tx->Tx4Urb)
-		usb_free_urb(pWb35Tx->Tx4Urb);
-
-	if (pWb35Tx->Tx2Urb)
-		usb_free_urb(pWb35Tx->Tx2Urb);
+	usb_free_urb(pWb35Tx->Tx4Urb);
+	usb_free_urb(pWb35Tx->Tx2Urb);
 
 	pr_debug("Wb35Tx_destroy OK\n");
 }
#1 lore raw
Quoted 3 lines · Harsh Kumar

usb_free_urb(NULL) is safe. So, the check was removed.

ACK.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html