linux/drivers/net/wireless/broadcom/brcm80211
Wentao Liang 8e089e7b58 wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()
The function brcmf_usb_dl_writeimage() calls the function
brcmf_usb_dl_cmd() but dose not check its return value. The
'state.state' and the 'state.bytes' are uninitialized if the
function brcmf_usb_dl_cmd() fails. It is dangerous to use
uninitialized variables in the conditions.

Add error handling for brcmf_usb_dl_cmd() to jump to error
handling path if the brcmf_usb_dl_cmd() fails and the
'state.state' and the 'state.bytes' are uninitialized.

Improve the error message to report more detailed error
information.

Fixes: 71bb244ba2 ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
Cc: stable@vger.kernel.org # v3.4+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20250422042203.2259-1-vulab@iscas.ac.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-04-23 14:59:04 +02:00
..
brcmfmac wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage() 2025-04-23 14:59:04 +02:00
brcmsmac wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy() 2024-12-13 14:54:42 +02:00
brcmutil kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
include wifi: brcmfmac: add flag for random seed during firmware download 2024-09-18 16:53:48 +03:00
Kconfig wifi: brcm80211: BRCM_TRACING should depend on TRACING 2024-10-17 17:23:42 +03:00
Makefile