diff options
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 f8611997bd77..5dce797bddb7 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) | |||
317 | tower_abort_transfers (dev); | 317 | tower_abort_transfers (dev); |
318 | 318 | ||
319 | /* free data structures */ | 319 | /* free data structures */ |
320 | if (dev->interrupt_in_urb != NULL) { | 320 | usb_free_urb(dev->interrupt_in_urb); |
321 | usb_free_urb (dev->interrupt_in_urb); | 321 | usb_free_urb(dev->interrupt_out_urb); |
322 | } | ||
323 | if (dev->interrupt_out_urb != NULL) { | ||
324 | usb_free_urb (dev->interrupt_out_urb); | ||
325 | } | ||
326 | kfree (dev->read_buffer); | 322 | kfree (dev->read_buffer); |
327 | kfree (dev->interrupt_in_buffer); | 323 | kfree (dev->interrupt_in_buffer); |
328 | kfree (dev->interrupt_out_buffer); | 324 | kfree (dev->interrupt_out_buffer); |
@@ -502,15 +498,11 @@ static void tower_abort_transfers (struct lego_usb_tower *dev) | |||
502 | if (dev->interrupt_in_running) { | 498 | if (dev->interrupt_in_running) { |
503 | dev->interrupt_in_running = 0; | 499 | dev->interrupt_in_running = 0; |
504 | mb(); | 500 | mb(); |
505 | if (dev->interrupt_in_urb != NULL && dev->udev) { | 501 | if (dev->udev) |
506 | usb_kill_urb (dev->interrupt_in_urb); | 502 | usb_kill_urb (dev->interrupt_in_urb); |
507 | } | ||
508 | } | ||
509 | if (dev->interrupt_out_busy) { | ||
510 | if (dev->interrupt_out_urb != NULL && dev->udev) { | ||
511 | usb_kill_urb (dev->interrupt_out_urb); | ||
512 | } | ||
513 | } | 503 | } |
504 | if (dev->interrupt_out_busy && dev->udev) | ||
505 | usb_kill_urb(dev->interrupt_out_urb); | ||
514 | 506 | ||
515 | exit: | 507 | exit: |
516 | dbg(2, "%s: leave", __FUNCTION__); | 508 | dbg(2, "%s: leave", __FUNCTION__); |