diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2006-11-08 15:36:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 14:23:34 -0800 |
commit | f53510e8c49d00085a820ae98ca4753d4487dbad (patch) | |
tree | fc57d638822f72427d70f1c46122007d0956a76f /drivers/usb | |
parent | 2891a51cc27e0eed9474668b58e4f587b9f36694 (diff) | |
download | op-kernel-dev-f53510e8c49d00085a820ae98ca4753d4487dbad.zip op-kernel-dev-f53510e8c49d00085a820ae98ca4753d4487dbad.tar.gz |
usb: legousbtower free kill urb cleanup
Hello,
- usb_free_urb() cleanup
- usb_kill_urb() cleanup
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index f861199..5dce797 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -317,12 +317,8 @@ static inline void tower_delete (struct lego_usb_tower *dev) tower_abort_transfers (dev); /* free data structures */ - if (dev->interrupt_in_urb != NULL) { - usb_free_urb (dev->interrupt_in_urb); - } - if (dev->interrupt_out_urb != NULL) { - usb_free_urb (dev->interrupt_out_urb); - } + usb_free_urb(dev->interrupt_in_urb); + usb_free_urb(dev->interrupt_out_urb); kfree (dev->read_buffer); kfree (dev->interrupt_in_buffer); kfree (dev->interrupt_out_buffer); @@ -502,15 +498,11 @@ static void tower_abort_transfers (struct lego_usb_tower *dev) if (dev->interrupt_in_running) { dev->interrupt_in_running = 0; mb(); - if (dev->interrupt_in_urb != NULL && dev->udev) { + if (dev->udev) usb_kill_urb (dev->interrupt_in_urb); - } - } - if (dev->interrupt_out_busy) { - if (dev->interrupt_out_urb != NULL && dev->udev) { - usb_kill_urb (dev->interrupt_out_urb); - } } + if (dev->interrupt_out_busy && dev->udev) + usb_kill_urb(dev->interrupt_out_urb); exit: dbg(2, "%s: leave", __FUNCTION__); |