]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: winbond: usb_free_urb(NULL) is safe
authorHarsh Kumar <harsh1kumar@gmail.com>
Wed, 26 Sep 2012 18:06:15 +0000 (23:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2012 21:02:54 +0000 (14:02 -0700)
usb_free_urb(NULL) is safe. So, the check was removed.

Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/winbond/wb35tx.c

index 474cad8bf5e7d4a5df363494397e801ec6625373..30a77ccfe48069d684ce469b5812377f65628655 100644 (file)
@@ -170,11 +170,8 @@ void Wb35Tx_destroy(struct hw_data *pHwData)
        } 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");
 }