diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | 3c7208f253571ee5f157b98f0e315b5172afe092 (patch) | |
tree | e4c29817e4c097d8de9ef025b600d753d06a155e /drivers/isdn/hisax/st5481_usb.c | |
parent | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (diff) |
[PATCH] kfree cleanup: drivers/isdn
This is the drivers/isdn/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/isdn/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax/st5481_usb.c')
-rw-r--r-- | drivers/isdn/hisax/st5481_usb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index 89fbeb58485d..b096b64b0253 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c | |||
@@ -335,14 +335,12 @@ void st5481_release_usb(struct st5481_adapter *adapter) | |||
335 | 335 | ||
336 | // Stop and free Control and Interrupt URBs | 336 | // Stop and free Control and Interrupt URBs |
337 | usb_kill_urb(ctrl->urb); | 337 | usb_kill_urb(ctrl->urb); |
338 | if (ctrl->urb->transfer_buffer) | 338 | kfree(ctrl->urb->transfer_buffer); |
339 | kfree(ctrl->urb->transfer_buffer); | ||
340 | usb_free_urb(ctrl->urb); | 339 | usb_free_urb(ctrl->urb); |
341 | ctrl->urb = NULL; | 340 | ctrl->urb = NULL; |
342 | 341 | ||
343 | usb_kill_urb(intr->urb); | 342 | usb_kill_urb(intr->urb); |
344 | if (intr->urb->transfer_buffer) | 343 | kfree(intr->urb->transfer_buffer); |
345 | kfree(intr->urb->transfer_buffer); | ||
346 | usb_free_urb(intr->urb); | 344 | usb_free_urb(intr->urb); |
347 | ctrl->urb = NULL; | 345 | ctrl->urb = NULL; |
348 | } | 346 | } |
@@ -457,8 +455,7 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev, | |||
457 | err: | 455 | err: |
458 | for (j = 0; j < 2; j++) { | 456 | for (j = 0; j < 2; j++) { |
459 | if (urb[j]) { | 457 | if (urb[j]) { |
460 | if (urb[j]->transfer_buffer) | 458 | kfree(urb[j]->transfer_buffer); |
461 | kfree(urb[j]->transfer_buffer); | ||
462 | urb[j]->transfer_buffer = NULL; | 459 | urb[j]->transfer_buffer = NULL; |
463 | usb_free_urb(urb[j]); | 460 | usb_free_urb(urb[j]); |
464 | urb[j] = NULL; | 461 | urb[j] = NULL; |
@@ -473,8 +470,7 @@ void st5481_release_isocpipes(struct urb* urb[2]) | |||
473 | 470 | ||
474 | for (j = 0; j < 2; j++) { | 471 | for (j = 0; j < 2; j++) { |
475 | usb_kill_urb(urb[j]); | 472 | usb_kill_urb(urb[j]); |
476 | if (urb[j]->transfer_buffer) | 473 | kfree(urb[j]->transfer_buffer); |
477 | kfree(urb[j]->transfer_buffer); | ||
478 | usb_free_urb(urb[j]); | 474 | usb_free_urb(urb[j]); |
479 | urb[j] = NULL; | 475 | urb[j] = NULL; |
480 | } | 476 | } |