aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/st5481_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/st5481_usb.c')
-rw-r--r--drivers/isdn/hisax/st5481_usb.c12
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 }