diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 1d085eed72d0..c7b909a5aaec 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -723,20 +723,17 @@ static void create_le_conn_complete(struct hci_dev *hdev, u8 status, u16 opcode) hci_dev_lock(hdev); conn = hci_lookup_le_connect(hdev); + if (!conn) + goto done; if (!status) { hci_connect_le_scan_cleanup(conn); - goto done; + } else { + BT_ERR("HCI request failed to create LE connection: status 0x%2.2x", + status); + hci_le_conn_failed(conn, status); } - BT_ERR("HCI request failed to create LE connection: status 0x%2.2x", - status); - - if (!conn) - goto done; - - hci_le_conn_failed(conn, status); - done: hci_dev_unlock(hdev); } |