brcmfmac: fix uninitialized warning
PATCH 1/1 brcmfmac: fix uninitialized warning
Building brcmfmac for sparc64 gave the following warning:
CC [M] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.o
bcmsdh_sdmmc.c: In function 'brcmf_sdioh_request_byte':
bcmsdh_sdmmc.c:89:6: warning: 'err_ret' may be used uninitialized
in this function [-Wuninitialized]
Inspecting the code it indeed had a path of execution in which the return value was used uninitialized. This patch fixes that code path.
Reviewed-by Hante Meuleman <[email protected]>
Reviewed-by Franky Lin <[email protected]>
Reviewed-by Pieter-Paul Giesberts <[email protected]>
Signed-off-by Arend van Spriel <[email protected]>
---
Hi John,
This problem popped up when enabling some more build targets and figured it could be taken for 3.13. Just strange it only showed on sparc64 as the warning seems valid. Anyway, it applies to the wireless master branch.
Regards,
Arend
--- drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +2 -0
@@ -109,6 +109,8 @@ static inline int brcmf_sdioh_f0_write_byte(struct brcmf_sdio_dev *sdiodev,brcmf_err ("Disable F2 failed:%d\n" , err_ret); } + }else { + err_ret = -ENOENT ; } }else if ((regaddr ==SDIO_CCCR_ABORT ) || (regaddr == SDIO_CCCR_IENx)) {
Signature · 1 line
1.8.1.3