Skip to contentSkip to conversation

wcn36xx: Uninitialized variable in wcn36xx_change_opchannel()

PATCH In review Dan Carpenter 3 participants 3 messages Feb 1, 2022 – Feb 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/wcn36xx/main.c +1 -1
index 75661d449712..1a06eff07107 100644
@@ -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;
 
Signature · 1 line
2.20.1
#2 lore raw
In reply to Dan Carpenter
Quoted 7 lines · Dan Carpenter

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")

Patch applied to ath-next branch of ath.git, thanks.

11e41e292937 wcn36xx: Uninitialized variable in wcn36xx_change_opchannel()

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20220201125941.GA22458@kili/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches