Skip to content

Commit

Permalink
Bluetooth: Fix possible infinite recursion of btusb_reset
Browse files Browse the repository at this point in the history
The function enters infinite recursion if the HCI device doesn't support
GPIO reset: btusb_reset -> hdev->reset -> vendor_reset -> btusb_reset...

btusb_reset shouldn't call hdev->reset after commit f07d478
("Bluetooth: Get rid of cmd_timeout and use the reset callback")

Fixes: f07d478 ("Bluetooth: Get rid of cmd_timeout and use the reset callback")
Signed-off-by: Hsin-chen Chuang <chharry@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Hsin-chen Chuang authored and Luiz Augusto von Dentz committed Jan 29, 2025
1 parent e9087e8 commit 0983fb4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,11 +899,6 @@ static void btusb_reset(struct hci_dev *hdev)
struct btusb_data *data;
int err;

if (hdev->reset) {
hdev->reset(hdev);
return;
}

data = hci_get_drvdata(hdev);
/* This is not an unbalanced PM reference since the device will reset */
err = usb_autopm_get_interface(data->intf);
Expand Down

0 comments on commit 0983fb4

Please sign in to comment.