From: Dmitry Shmidt Date: Fri, 28 Oct 2011 17:35:37 +0000 (-0700) Subject: net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT X-Git-Tag: firefly_0821_release~4090^2~800 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a513dd43e6fea935bb5113fd13fd12e627dfeebb;p=firefly-linux-kernel-4.4.55.git net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT Signed-off-by: Dmitry Shmidt --- diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 49ad81dfae55..e2f74e66a169 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -790,9 +790,11 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev, #ifndef CONFIG_CFG80211_ALLOW_RECONNECT if (wdev->sme_state != CFG80211_SME_IDLE) return -EALREADY; -#endif if (WARN_ON(wdev->connect_keys)) { +#else + if (wdev->connect_keys) { +#endif kfree(wdev->connect_keys); wdev->connect_keys = NULL; }