From: Johannes Berg Date: Mon, 21 Nov 2016 12:55:48 +0000 (+0100) Subject: nl80211: fix logic inversion in start_nan() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eeb04a9688f4f939f2a0eaec5a2d53e05e75e691;p=linux-beck.git nl80211: fix logic inversion in start_nan() Arend inadvertently inverted the logic while converting to wdev_running(), fix that. Fixes: 73c7da3dae1e ("cfg80211: add generic helper to check interface is running") Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 24ab199ef2fc..765bd41b1623 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10628,7 +10628,7 @@ static int nl80211_start_nan(struct sk_buff *skb, struct genl_info *info) if (wdev->iftype != NL80211_IFTYPE_NAN) return -EOPNOTSUPP; - if (!wdev_running(wdev)) + if (wdev_running(wdev)) return -EEXIST; if (rfkill_blocked(rdev->rfkill))