]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()
authorHaowen Bai <baihaowen@meizu.com>
Fri, 22 Apr 2022 02:10:35 +0000 (10:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 14:48:31 +0000 (16:48 +0200)
commitbaf407561bd1e98b66e9c7c2f1e6ebff920be441
tree03f8259fd03d369759fe5e111fb988e38020591c
parent5f8f558332886f06b7c6b53931e847d35f60fbc9
staging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()

The ieee80211_check_auth_response() function has a signedness bug because
it's a declared as a u16 but it return -ENOMEM.  When you look at it more
closely it returns a mix of error codes including 0xcafe, -ENOMEM, and
a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG.  This is a mess.

Clean it up to just return standard kernel error codes.  We can print
out the a->status before returning a regular error code.  The printks
in the caller need to be adjusted as well.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650593435-9017-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c