aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bpa10x.c7
-rw-r--r--drivers/bluetooth/hci_usb.c6
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 2771c861f185..f696da6f417b 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -367,11 +367,8 @@ static inline void bpa10x_free_urb(struct urb *urb)
367 if (!urb) 367 if (!urb)
368 return; 368 return;
369 369
370 if (urb->setup_packet) 370 kfree(urb->setup_packet);
371 kfree(urb->setup_packet); 371 kfree(urb->transfer_buffer);
372
373 if (urb->transfer_buffer)
374 kfree(urb->transfer_buffer);
375 372
376 usb_free_urb(urb); 373 usb_free_urb(urb);
377} 374}
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index e8bad41da37f..319871ca9f9f 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -390,10 +390,8 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb)
390 urb = &_urb->urb; 390 urb = &_urb->urb;
391 BT_DBG("%s freeing _urb %p type %d urb %p", 391 BT_DBG("%s freeing _urb %p type %d urb %p",
392 husb->hdev->name, _urb, _urb->type, urb); 392 husb->hdev->name, _urb, _urb->type, urb);
393 if (urb->setup_packet) 393 kfree(urb->setup_packet);
394 kfree(urb->setup_packet); 394 kfree(urb->transfer_buffer);
395 if (urb->transfer_buffer)
396 kfree(urb->transfer_buffer);
397 _urb_free(_urb); 395 _urb_free(_urb);
398 } 396 }
399 397