]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "Bluetooth: Move shutdown callback before flushing tx and rx queue"
authorSasha Levin <sashal@kernel.org>
Thu, 16 Sep 2021 01:16:27 +0000 (21:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Sep 2021 10:56:13 +0000 (12:56 +0200)
This reverts commit abbcd61d091f69ec98013dc0ae9c992e152fc303.

Botched backport, dropping to reword for next release.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_core.c

index bdd330527cfa2247aba84902ac37aaca5e625ac3..c50e3e8afbd349616778a0eb1e3dc948aa263acb 100644 (file)
@@ -1691,14 +1691,6 @@ int hci_dev_do_close(struct hci_dev *hdev)
        hci_request_cancel_all(hdev);
        hci_req_sync_lock(hdev);
 
-       if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
-           !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
-           test_bit(HCI_UP, &hdev->flags)) {
-               /* Execute vendor specific shutdown routine */
-               if (hdev->shutdown)
-                       hdev->shutdown(hdev);
-       }
-
        if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
                cancel_delayed_work_sync(&hdev->cmd_timer);
                hci_req_sync_unlock(hdev);