From: Johannes Berg Date: Wed, 13 Jul 2022 08:24:23 +0000 (+0200) Subject: wifi: cfg80211: set country_elem to NULL X-Git-Tag: block-6.0-2022-08-12~31^2~64^2~87 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e3d331c9b6205d21ace0f5285d21a5ba553c1068;p=linux-2.6-block.git wifi: cfg80211: set country_elem to NULL 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 --- diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 22996d63c15f..62c773cf1b8d 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -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