From: Dan Carpenter Date: Tue, 1 Feb 2022 12:59:41 +0000 (+0300) Subject: wcn36xx: Uninitialized variable in wcn36xx_change_opchannel() X-Git-Tag: howlett/maple/20220722_2~938^2~110^2~32^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=11e41e2929378df945bf50b95409d93059ad4507;p=users%2Fjedix%2Flinux-maple.git wcn36xx: Uninitialized variable in wcn36xx_change_opchannel() This code needs "channel" to be initialized to NULL for it to work correctly. Fixes: d6f2746691cb ("wcn36xx: Track the band and channel we are tuned to") Signed-off-by: Dan Carpenter Reviewed-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220201125941.GA22458@kili --- diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 210229618769..95ea7d040d8c 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -394,7 +394,7 @@ static void wcn36xx_change_opchannel(struct wcn36xx *wcn, int ch) struct ieee80211_vif *vif = NULL; struct wcn36xx_vif *tmp; struct ieee80211_supported_band *band; - struct ieee80211_channel *channel; + struct ieee80211_channel *channel = NULL; unsigned long flags; int i, j;