cw1200: Fix a signedness bug in cw1200_load_firmware()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Oct 2019 11:45:01 +0000 (14:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:55 +0000 (08:22 +0100)
commitc3e9f7d5f0ea3605a76e415d3d3ce0b9d05928fe
treed8dfa349b088aca45cf6d029236f7f08330989da
parentf690a8ced5eda144f34e60e7eb73dd3e4a02b52e
cw1200: Fix a signedness bug in cw1200_load_firmware()

commit 4a50d454502f1401171ff061a5424583f91266db upstream.

The "priv->hw_type" is an enum and in this context GCC will treat it
as an unsigned int so the error handling will never trigger.

Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/st/cw1200/fwio.c