]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wifi: cfg80211: set country_elem to NULL
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Jul 2022 08:24:23 +0000 (10:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:21 +0000 (11:43 +0200)
The link loop will always have a valid link so that
it's always set, but static checkers don't always
see that, so set it to NULL explicitly.

Fixes: efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/sme.c

index 22996d63c15fa3e88b685693306a990ffb671610..62c773cf1b8df1f9fcfece1232607b7d51d0b402 100644 (file)
@@ -723,7 +723,7 @@ void __cfg80211_connect_result(struct net_device *dev,
                               bool wextev)
 {
        struct wireless_dev *wdev = dev->ieee80211_ptr;
-       const struct element *country_elem;
+       const struct element *country_elem = NULL;
        const u8 *country_data;
        u8 country_datalen;
 #ifdef CONFIG_CFG80211_WEXT