diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2015-04-26 14:51:50 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-04-30 12:45:27 -0400 |
commit | d24d81444f8caf1895256ef2d2e89ae8202a17e4 (patch) | |
tree | 04220c0d5248da784125aa4ee7ee550f6354c366 /net/bluetooth | |
parent | 7f0b8a56c978b0a3315ac84c6cbb065413afb8e9 (diff) |
Bluetooth: Skip the shutdown routine if the interface is not up
Most likely, the shutdown routine requires the interface to be up.
This is the case for BTUSB_INTEL: the routine tries to send a command
to the interface, but since this one is down, it fails and exits once
HCI_INIT_TIMEOUT has expired.
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 4.0.x
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 476709bd068a..4663c3dad3f5 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1557,7 +1557,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
1557 | { | 1557 | { |
1558 | BT_DBG("%s %p", hdev->name, hdev); | 1558 | BT_DBG("%s %p", hdev->name, hdev); |
1559 | 1559 | ||
1560 | if (!hci_dev_test_flag(hdev, HCI_UNREGISTER)) { | 1560 | if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && |
1561 | test_bit(HCI_UP, &hdev->flags)) { | ||
1561 | /* Execute vendor specific shutdown routine */ | 1562 | /* Execute vendor specific shutdown routine */ |
1562 | if (hdev->shutdown) | 1563 | if (hdev->shutdown) |
1563 | hdev->shutdown(hdev); | 1564 | hdev->shutdown(hdev); |