diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-08-15 14:29:27 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2024-08-22 11:41:37 +0300 |
commit | c9f4c1ec69728310a31080c266b8529381c1a7fa (patch) | |
tree | ee56e5d5071e2eae0fef30a1ddb21d148d3ecd83 | |
parent | a7e8997ae18c42d30bc7181421b5715e319c0f71 (diff) | |
download | lwn-c9f4c1ec69728310a31080c266b8529381c1a7fa.tar.gz lwn-c9f4c1ec69728310a31080c266b8529381c1a7fa.zip |
wifi: mwifiex: Fix uninitialized variable in mwifiex_cfg80211_authenticate()
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>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/d7d043b2-95d5-4e1d-b340-5d7330053ac6@stanley.mountain
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index e36ef075fe05..888b586da266 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"); |