]> git.baikalelectronics.ru Git - kernel.git/commit
brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Oct 2016 22:13:40 +0000 (00:13 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Oct 2016 15:04:54 +0000 (18:04 +0300)
commitafbaaff1335241bee8f73e5017a4cff9ea90041d
tree43b0889cb47963554a40f264502601a6092d0f43
parentacfc09cabaafa5cf022b62082143bb888bcbc2ff
brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap

A bugfix added a sanity check around the assignment and use of the
'is_11d' variable, which looks correct to me, but as the function is
rather complex already, this confuses the compiler to the point where
it can no longer figure out if the variable is always initialized
correctly:

brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’:
brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This adds an initialization for the newly introduced case in which
the variable should not really be used, in order to make the warning
go away.

Fixes: 2b20c5b00847 ("brcmfmac: ignore 11d configuration errors")
Cc: Hante Meuleman <hante.meuleman@broadcom.com>
Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c