diff options
author | Archie Pusaka <apusaka@chromium.org> | 2022-10-05 15:09:47 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-10-10 14:06:28 -0700 |
commit | 64b5c4c8e79c131fe8f135bab5e5dfaa245c5776 (patch) | |
tree | 133377c09e13fd4677f21fa9dae442dd0642dc3a | |
parent | 8549542298e92bbf78f8139779e87a829b00eb02 (diff) | |
download | bluetooth-next.tar.gz |
Bluetooth: hci_sync: cancel cmd_timer if hci_open failedbluetooth-next
If a command is already sent, we take care of freeing it, but we
also need to cancel the timeout as well.
Signed-off-by: Archie Pusaka <apusaka@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@google.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-rw-r--r-- | net/bluetooth/hci_sync.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index b53bb0ee9d3975..bd9eb713b26b4d 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -4714,6 +4714,7 @@ int hci_dev_open_sync(struct hci_dev *hdev) hdev->flush(hdev); if (hdev->sent_cmd) { + cancel_delayed_work_sync(&hdev->cmd_timer); kfree_skb(hdev->sent_cmd); hdev->sent_cmd = NULL; } |