Message ID | 1468884277-18606-5-git-send-email-f.fainelli@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f823a2aa8f4674c095a5413b9e3ba12d82df06f2 |
Delegated to: | Kalle Valo |
Headers | show |
On 19-7-2016 1:24, Florian Fainelli wrote: > wlc_phy_txpower_get_current() does a logical OR of power->flags, which > presumes that power.flags was initiliazed earlier by the caller, > unfortunately, this is not the case, so make sure we zero out the struct > tx_power before calling into wlc_phy_txpower_get_current(). > > Reported-by: coverity (CID 146011) > Fixes: 5b435de0d7868 ("net: wireless: add brcm80211 drivers") Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > --- > drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c > index dd9162722495..0ab865de1491 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c > @@ -87,7 +87,7 @@ void > brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel, > u16 chanspec) > { > - struct tx_power power; > + struct tx_power power = { }; > u8 siso_mcs_id, cdd_mcs_id, stbc_mcs_id; > > /* Clear previous settings */ > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c index dd9162722495..0ab865de1491 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c @@ -87,7 +87,7 @@ void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel, u16 chanspec) { - struct tx_power power; + struct tx_power power = { }; u8 siso_mcs_id, cdd_mcs_id, stbc_mcs_id; /* Clear previous settings */
wlc_phy_txpower_get_current() does a logical OR of power->flags, which presumes that power.flags was initiliazed earlier by the caller, unfortunately, this is not the case, so make sure we zero out the struct tx_power before calling into wlc_phy_txpower_get_current(). Reported-by: coverity (CID 146011) Fixes: 5b435de0d7868 ("net: wireless: add brcm80211 drivers") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/stf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)