From: Arend van Spriel Date: Wed, 5 Dec 2012 14:25:55 +0000 (+0100) Subject: brcmsmac: fix uninitialized variable warning on arm architecture X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d8df4901b351f5cac83cce78749e93215fa25ed9;p=linux-beck.git 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 Reviewed-by: Piotr Haber Reviewed-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- 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) /* check if the device is removed */ bool ai_deviceremoved(struct si_pub *sih) { - u32 w; + u32 w = 0; struct si_info *sii; sii = container_of(sih, struct si_info, pub);