Skip to contentSkip to conversation

rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()

PATCH In review Ping-Ke Shih 2 participants 2 messages Mar 11, 2022 – Mar 16, 2022 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()

smatch reports that:
fw.c:1997 rtw89_append_probe_req_ie() error: uninitialized symbol 'ret'.

This can be a issue only if no band is supported by the chip, but it is impossible. So, it is still safe without this patch.

---
 drivers/net/wireless/realtek/rtw89/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/fw.c +1 -1
index 2fe091cc12c0e..6deaf8eec6b47 100644
@@ -1964,7 +1964,7 @@ static int rtw89_append_probe_req_ie(struct rtw89_dev *rtwdev,
 	struct ieee80211_scan_ies *ies = rtwvif->scan_ies;
 	struct rtw89_pktofld_info *info;
 	struct sk_buff *new;
-	int ret;
+	int ret = 0;
 	u8 band;
 
 	for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) {
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Ping-Ke Shih

smatch reports that:
fw.c:1997 rtw89_append_probe_req_ie() error: uninitialized symbol 'ret'.

This can be a issue only if no band is supported by the chip, but it is impossible. So, it is still safe without this patch.

Patch applied to wireless-next.git, thanks.

d179c1f1c370 rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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