diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-04-26 15:39:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-26 15:39:10 -0400 |
commit | 429576b97c623b9c4e3375fb7c37bce377f51e68 (patch) | |
tree | dc4fd40ae54d177ddb3cb3991e8c3ff019eef238 /net/bluetooth/hci_core.c | |
parent | 9835a30e980561082beb02ce724f6e555787bc19 (diff) | |
parent | 069f40fc07f6df3da325e7ea1698a0d6247983d5 (diff) | |
download | linux-429576b97c623b9c4e3375fb7c37bce377f51e68.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index a80bc1cdb35b..227bde39ee58 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -586,10 +586,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) hci_req_cancel(hdev, ENODEV); hci_req_lock(hdev); - /* Stop timer, it might be running */ - del_timer_sync(&hdev->cmd_timer); - if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { + del_timer_sync(&hdev->cmd_timer); hci_req_unlock(hdev); return 0; } @@ -628,6 +626,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) /* Drop last sent command */ if (hdev->sent_cmd) { + del_timer_sync(&hdev->cmd_timer); kfree_skb(hdev->sent_cmd); hdev->sent_cmd = NULL; } |