From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kalle Valo <kvalo@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] wcn36xx: Uninitialized variable in wcn36xx_change_opchannel()
Date: Tue, 1 Feb 2022 15:59:41 +0300 [thread overview]
Message-ID: <20220201125941.GA22458@kili> (raw)
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>
---
drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 75661d449712..1a06eff07107 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;
--
2.20.1
next reply other threads:[~2022-02-01 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 12:59 Dan Carpenter [this message]
2022-02-01 21:34 ` [PATCH] wcn36xx: Uninitialized variable in wcn36xx_change_opchannel() Bryan O'Donoghue
2022-02-10 8:51 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220201125941.GA22458@kili \
--to=dan.carpenter@oracle.com \
--cc=bryan.odonoghue@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wcn36xx@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).