From 9400941eaddbb3aa54659ccafd4129e9eecdbb8d Mon Sep 17 00:00:00 2001 From: Hsin-chen Chuang Date: Mon, 20 Jan 2025 18:39:39 +0800 Subject: [PATCH] FROMGIT: 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 f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset callback") Fixes: f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset callback") Signed-off-by: Hsin-chen Chuang Signed-off-by: Luiz Augusto von Dentz Bug: 376104075 (cherry picked from commit 9e2714de7384d2e318c9bb0d2570229dc415a22e https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master) Change-Id: I2da8e86ec6ac5efe7dac04faced5f90cc086bd01 Signed-off-by: Hsin-chen Chuang --- drivers/bluetooth/btusb.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index cd8a212b3e20..01ecbdc51383 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -882,11 +882,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);