From: Greg Kroah-Hartman gregkh@linuxfoundation.org
In commit bc45aa1911bf699b9905f12414e3c1879d6b784f which is commit 81d17f6f3331f03c8eafdacea68ab773426c1e3c upstream, the return value of the error condition needs to be reworked to return a real error and not NULL.
Reported-by: Nathan Chancellor nathan@kernel.org Cc: Dokyung Song dokyungs@yonsei.ac.kr Cc: Jisoo Jang jisoo.jang@yonsei.ac.kr Cc: Minsuk Kang linuxlovemin@yonsei.ac.kr Cc: Kalle Valo kvalo@kernel.org Cc: Sasha Levin sashal@kernel.org Link: https://lore.kernel.org/r/Y8gccXXyE30sbPSg@dev-arch.thelio-3990X Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c @@ -574,7 +574,7 @@ int brcmf_fw_map_chip_to_name(u32 chip,
if (chiprev >= BITS_PER_TYPE(u32)) { brcmf_err("Invalid chip revision %u\n", chiprev); - return NULL; + return -EINVAL; }
for (i = 0; i < table_size; i++) {