diff mbox series

[v2,2/3] Bluetooth: Use bt_status to convert from errno

Message ID 20220513235125.1364692-2-luiz.dentz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] Bluetooth: Add bt_status | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix success PASS

Commit Message

Luiz Augusto von Dentz May 13, 2022, 11:51 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 882a7df13005..4a5193499b77 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -946,7 +946,7 @@  static void create_le_conn_complete(struct hci_dev *hdev, void *data, int err)
 	if (!conn)
 		goto done;
 
-	hci_le_conn_failed(conn, err);
+	hci_le_conn_failed(conn, bt_status(err));
 
 done:
 	hci_dev_unlock(hdev);