All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btusb: Remove redundant call to btusb_free_frags()
@ 2015-01-28  9:06 Johan Hedberg
  2015-01-28 20:35 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hedberg @ 2015-01-28  9:06 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

The btusb_disconnect() callback calls hci_unregister_dev() which in turn
calls btusb_close() if the HCI device is powered. The btusb_close()
function in turn will call btusb_free_frags(). It's therefore
unnecessary to have another call to btusb_free_frags() in the
btusb_disconnect() function. Besides the redundancy the second call
seems to also cause some strange stability issues which this patch then
also fixes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 drivers/bluetooth/btusb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4fac6927ee11..271db881e793 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2762,7 +2762,6 @@ static void btusb_disconnect(struct usb_interface *intf)
 	else if (data->isoc)
 		usb_driver_release_interface(&btusb_driver, data->isoc);
 
-	btusb_free_frags(data);
 	hci_free_dev(hdev);
 }
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: btusb: Remove redundant call to btusb_free_frags()
  2015-01-28  9:06 [PATCH] Bluetooth: btusb: Remove redundant call to btusb_free_frags() Johan Hedberg
@ 2015-01-28 20:35 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2015-01-28 20:35 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Hi Johan,

> The btusb_disconnect() callback calls hci_unregister_dev() which in turn
> calls btusb_close() if the HCI device is powered. The btusb_close()
> function in turn will call btusb_free_frags(). It's therefore
> unnecessary to have another call to btusb_free_frags() in the
> btusb_disconnect() function. Besides the redundancy the second call
> seems to also cause some strange stability issues which this patch then
> also fixes.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> drivers/bluetooth/btusb.c | 1 -
> 1 file changed, 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-28 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28  9:06 [PATCH] Bluetooth: btusb: Remove redundant call to btusb_free_frags() Johan Hedberg
2015-01-28 20:35 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.