linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()
@ 2022-03-11  2:00 Ping-Ke Shih
  2022-03-16 15:49 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Ping-Ke Shih @ 2022-03-11  2:00 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 2fe091cc12c0e..6deaf8eec6b47 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -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++) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()
  2022-03-11  2:00 [PATCH] rtw89: fix uninitialized variable of rtw89_append_probe_req_ie() Ping-Ke Shih
@ 2022-03-16 15:49 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-03-16 15:49 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless

Ping-Ke Shih <pkshih@realtek.com> wrote:

> 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.
> 
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

d179c1f1c370 rtw89: fix uninitialized variable of rtw89_append_probe_req_ie()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220311020007.20414-1-pkshih@realtek.com/

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-16 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11  2:00 [PATCH] rtw89: fix uninitialized variable of rtw89_append_probe_req_ie() Ping-Ke Shih
2022-03-16 15:49 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).