Re: [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap

From: Arnd Bergmann
Date: Wed Oct 26 2016 - 05:57:48 EST


On Wednesday, October 26, 2016 9:49:58 AM CEST Kalle Valo wrote:
> Arnd Bergmann <arnd@xxxxxxxx> writes:
>
> > 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: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors")
> > Cc: Hante Meuleman <hante.meuleman@xxxxxxxxxxxx>
> > Cc: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
> > Cc: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> Via which tree are you planning to submit this? Should I take it?

I'd prefer if you can take it and forward it along with your other
bugfixes. I'll try to take care of the ones that nobody else
picked up.

Arnd