Skip to content

Commit

Permalink
Staging: winbond: usb_free_urb(NULL) is safe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Harsh Kumar authored and Greg Kroah-Hartman committed Sep 26, 2012
1 parent 926ae52 commit ee692cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/winbond/wb35tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit ee692cf

Please sign in to comment.