summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-10-30 08:00:03 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-12-12 23:19:24 +0100
commit63db780a93eb802ece1bbf61ab5894ad8827b56e (patch)
treea1a43a1e0202a6087c84e0a0029961a0021d63d0 /net/bluetooth
parentBluetooth: Add CONFIG_BT_LE_L2CAP_ECRED (diff)
downloadlinux-63db780a93eb802ece1bbf61ab5894ad8827b56e.tar.xz
linux-63db780a93eb802ece1bbf61ab5894ad8827b56e.zip
Bluetooth: Fix EALREADY and ELOOP cases in bt_status()
'err' is known to be <0 at this point. So, some cases can not be reached because of a missing "-". Add it. Fixes: ca2045e059c3 ("Bluetooth: Add bt_status") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index 469a0c95b6e8..53a796ac078c 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -170,7 +170,7 @@ __u8 bt_status(int err)
case -EMLINK:
return 0x09;
- case EALREADY:
+ case -EALREADY:
return 0x0b;
case -EBUSY:
@@ -191,7 +191,7 @@ __u8 bt_status(int err)
case -ECONNABORTED:
return 0x16;
- case ELOOP:
+ case -ELOOP:
return 0x17;
case -EPROTONOSUPPORT: