diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-12-05 09:25:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-10 15:33:05 -0500 |
commit | d8df4901b351f5cac83cce78749e93215fa25ed9 (patch) | |
tree | 458555f50d4602e38083e05551af2aceb55dacc5 | |
parent | d9cb2596503d937ccf68b83d3aff1056765a6b1e (diff) |
brcmsmac: fix uninitialized variable warning on arm architecture
Using gcc v4.7.2 gave following warning:
CC [M] drivers/net/wireless/brcm80211/brcmsmac/aiutils.o
brcmsmac/aiutils.c: In function 'ai_deviceremoved':
brcmsmac/aiutils.c:733:9: error: 'w' may be used uninitialized
in this function [-Werror=uninitialized]
Inspection of the pci_read_config_dword() function showed it can
return without modifying the output variable 'w' so this patch
initializes it to 0.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c index de96290f5ccd..f0888a9ee32e 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | |||
@@ -721,7 +721,7 @@ void ai_epa_4313war(struct si_pub *sih) | |||
721 | /* check if the device is removed */ | 721 | /* check if the device is removed */ |
722 | bool ai_deviceremoved(struct si_pub *sih) | 722 | bool ai_deviceremoved(struct si_pub *sih) |
723 | { | 723 | { |
724 | u32 w; | 724 | u32 w = 0; |
725 | struct si_info *sii; | 725 | struct si_info *sii; |
726 | 726 | ||
727 | sii = container_of(sih, struct si_info, pub); | 727 | sii = container_of(sih, struct si_info, pub); |