Commit 0983fb47 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang Committed by Luiz Augusto von Dentz
Browse files

Bluetooth: Fix possible infinite recursion of btusb_reset



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 f07d4780
("Bluetooth: Get rid of cmd_timeout and use the reset callback")

Fixes: f07d4780 ("Bluetooth: Get rid of cmd_timeout and use the reset callback")
Signed-off-by: default avatarHsin-chen Chuang <chharry@chromium.org>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent e9087e82
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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);