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.2-rc1~99^2~15^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63db780a93eb802ece1bbf61ab5894ad8827b56e;p=thirdparty%2Flinux.git 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index 469a0c95b6e8a..53a796ac078c3 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: