Bluetooth: Use bt_status to convert from errno
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 4 May 2022 23:49:17 +0000 (16:49 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 22 Jul 2022 00:15:55 +0000 (17:15 -0700)
If a command cannot be sent or there is a internal error an errno maybe
set instead of a command status.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_conn.c

index 7829433..1ce89c4 100644 (file)
@@ -950,7 +950,7 @@ static void create_le_conn_complete(struct hci_dev *hdev, void *data, int err)
        if (conn != hci_lookup_le_connect(hdev))
                goto done;
 
-       hci_conn_failed(conn, err);
+       hci_conn_failed(conn, bt_status(err));
 
 done:
        hci_dev_unlock(hdev);