Bluetooth: btusb: Remove redundant call to btusb_free_frags()
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 28 Jan 2015 17:55:59 +0000 (19:55 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 28 Jan 2015 20:26:22 +0000 (21:26 +0100)
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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c

index 25ca93d13209fdbdacf0a75efc79fc64d44ede69..70513b8d4d4a0a9925e1b11cf514588750cb5fbb 100644 (file)
@@ -2767,7 +2767,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);
 }