aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 92b48e257b8..2216620ff29 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -587,6 +587,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
587 hci_req_cancel(hdev, ENODEV); 587 hci_req_cancel(hdev, ENODEV);
588 hci_req_lock(hdev); 588 hci_req_lock(hdev);
589 589
590 /* Stop timer, it might be running */
591 del_timer_sync(&hdev->cmd_timer);
592
590 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 593 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
591 hci_req_unlock(hdev); 594 hci_req_unlock(hdev);
592 return 0; 595 return 0;
@@ -626,7 +629,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)
626 629
627 /* Drop last sent command */ 630 /* Drop last sent command */
628 if (hdev->sent_cmd) { 631 if (hdev->sent_cmd) {
629 del_timer_sync(&hdev->cmd_timer);
630 kfree_skb(hdev->sent_cmd); 632 kfree_skb(hdev->sent_cmd);
631 hdev->sent_cmd = NULL; 633 hdev->sent_cmd = NULL;
632 } 634 }