diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3155ad588076..74f04a27734d 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -2405,8 +2405,14 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
2405 | hci_dev_lock(hdev); | 2405 | hci_dev_lock(hdev); |
2406 | 2406 | ||
2407 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &ev->bdaddr); | 2407 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &ev->bdaddr); |
2408 | if (!conn) | 2408 | if (!conn) { |
2409 | goto unlock; | 2409 | conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr); |
2410 | if (!conn) { | ||
2411 | BT_ERR("No memory for new connection"); | ||
2412 | hci_dev_unlock(hdev); | ||
2413 | return; | ||
2414 | } | ||
2415 | } | ||
2410 | 2416 | ||
2411 | if (ev->status) { | 2417 | if (ev->status) { |
2412 | hci_proto_connect_cfm(conn, ev->status); | 2418 | hci_proto_connect_cfm(conn, ev->status); |