Skip to content

Commit 97dfaf0

Browse files
apusakaVudentz
authored andcommitted
Bluetooth: hci_sync: cancel cmd_timer if hci_open failed
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 <[email protected]> Reviewed-by: Abhishek Pandit-Subedi <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent eeb1aaf commit 97dfaf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/bluetooth/hci_sync.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4721,6 +4721,7 @@ int hci_dev_open_sync(struct hci_dev *hdev)
47214721
hdev->flush(hdev);
47224722

47234723
if (hdev->sent_cmd) {
4724+
cancel_delayed_work_sync(&hdev->cmd_timer);
47244725
kfree_skb(hdev->sent_cmd);
47254726
hdev->sent_cmd = NULL;
47264727
}

0 commit comments

Comments
 (0)