Commit bd3f0ebb authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Fix connection creation error handling

This patch fixes the problem that ACL connections are removed from
the kernel connection hash when a hci_create_connection returns a
command status other than 0x00.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent adf791bd
......@@ -358,7 +358,7 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
status, batostr(&cp->bdaddr), conn);
if (status) {
if (conn) {
if (conn && conn->state == BT_CONNECT) {
conn->state = BT_CLOSED;
hci_proto_connect_cfm(conn, status);
hci_conn_del(conn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment