Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Fix incorrect branch in connection complete

When handling auto-connected devices, we should execute the rest of the
connection complete when it was previously discovered and it is an ACL
connection.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Abhishek Pandit-Subedi and committed by
Marcel Holtmann
2d186fcd 8731840a

+10 -9
+10 -9
net/bluetooth/hci_event.c
··· 2539 2539 bt_dev_err(hdev, "no memory for new conn"); 2540 2540 goto unlock; 2541 2541 } 2542 + } else { 2543 + if (ev->link_type != SCO_LINK) 2544 + goto unlock; 2545 + 2546 + conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, 2547 + &ev->bdaddr); 2548 + if (!conn) 2549 + goto unlock; 2550 + 2551 + conn->type = SCO_LINK; 2542 2552 } 2543 - 2544 - if (ev->link_type != SCO_LINK) 2545 - goto unlock; 2546 - 2547 - conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); 2548 - if (!conn) 2549 - goto unlock; 2550 - 2551 - conn->type = SCO_LINK; 2552 2553 } 2553 2554 2554 2555 if (!ev->status) {