wcn36xx: Uninitialized variable in wcn36xx_change_opchannel()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Feb 2022 12:59:41 +0000 (15:59 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 10 Feb 2022 08:51:15 +0000 (10:51 +0200)
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 <dan.carpenter@oracle.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonghue@linaro.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220201125941.GA22458@kili
drivers/net/wireless/ath/wcn36xx/main.c

index 210229618769e46b41f20b4db3ac9747f138b1b8..95ea7d040d8ccf0518cf16d555cd33d4b2982dab 100644 (file)
@@ -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;