From: Christophe JAILLET Date: Sun, 30 Oct 2022 07:00:03 +0000 (+0100) Subject: Bluetooth: Fix EALREADY and ELOOP cases in bt_status() X-Git-Tag: v6.1.8~1407 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a65b09e3130b38eb8c40ca8bcebba00d42be4fe5;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index 469a0c9..53a796a 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: