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