diff options
author | Christophe JAILLET | 2022-10-30 08:00:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2022-12-31 13:32:28 +0100 |
commit | a65b09e3130b38eb8c40ca8bcebba00d42be4fe5 (patch) | |
tree | c96dcf5ba3da0aeccbcb31815e8f9d528f4fb4ab /net/bluetooth | |
parent | 72560759f6e0aaa7920a1cfe41d005143ba31030 (diff) |
Bluetooth: Fix EALREADY and ELOOP cases in bt_status()
[ Upstream commit 63db780a93eb802ece1bbf61ab5894ad8827b56e ]
'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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/lib.c | 4 |
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: |