From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx> Cc: Dokyung Song <dokyungs@xxxxxxxxxxxx> Cc: Jisoo Jang <jisoo.jang@xxxxxxxxxxxx> Cc: Minsuk Kang <linuxlovemin@xxxxxxxxxxxx> Cc: Kalle Valo <kvalo@xxxxxxxxxx> Cc: Sasha Levin <sashal@xxxxxxxxxx> Link: https://lore.kernel.org/r/Y8gccXXyE30sbPSg@dev-arch.thelio-3990X Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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++) {