From: Dan Carpenter <dan.carpenter@linaro.org>
To: David Lin <yu-hao.lin@nxp.com>
Cc: Brian Norris <briannorris@chromium.org>,
Francesco Dolcini <francesco@dolcini.it>,
Kalle Valo <kvalo@kernel.org>,
Johannes Berg <johannes.berg@intel.com>,
Aloka Dixit <quic_alokad@quicinc.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Rafael Beims <rafael.beims@toradex.com>,
Ruan Jinjie <ruanjinjie@huawei.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] wifi: mwifiex: Fix uninitialized variable in mwifiex_cfg80211_authenticate()
Date: Thu, 15 Aug 2024 14:29:27 +0300 [thread overview]
Message-ID: <d7d043b2-95d5-4e1d-b340-5d7330053ac6@stanley.mountain> (raw)
Smatch complains that:
drivers/net/wireless/marvell/mwifiex/cfg80211.c:4408 mwifiex_cfg80211_authenticate()
error: uninitialized symbol 'varptr'.
It's a check for NULL, but "varptr" is either non-NULL or uninitialized.
Initialize it to NULL.
Fixes: 36995892c271 ("wifi: mwifiex: add host mlme for client mode")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 722ead51e912..7505de304052 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -4284,7 +4284,7 @@ mwifiex_cfg80211_authenticate(struct wiphy *wiphy,
struct mwifiex_txinfo *tx_info;
u32 tx_control = 0, pkt_type = PKT_TYPE_MGMT;
u8 trans = 1, status_code = 0;
- u8 *varptr;
+ u8 *varptr = NULL;
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) {
mwifiex_dbg(priv->adapter, ERROR, "Interface role is AP\n");
--
2.43.0
next reply other threads:[~2024-08-15 11:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 11:29 Dan Carpenter [this message]
2024-08-15 17:31 ` Brian Norris
2024-08-22 8:41 ` 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=d7d043b2-95d5-4e1d-b340-5d7330053ac6@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_alokad@quicinc.com \
--cc=rafael.beims@toradex.com \
--cc=ruanjinjie@huawei.com \
--cc=s.hauer@pengutronix.de \
--cc=yu-hao.lin@nxp.com \
/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
all inboxes | Powered by JetHome®