Return-path: Received: from mail-pg0-f47.google.com ([74.125.83.47]:36684 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbcKUM5N (ORCPT ); Mon, 21 Nov 2016 07:57:13 -0500 Received: by mail-pg0-f47.google.com with SMTP id f188so130092907pgc.3 for ; Mon, 21 Nov 2016 04:57:13 -0800 (PST) Subject: Re: [PATCH] nl80211: fix logic inversion in start_nan() To: Johannes Berg , linux-wireless@vger.kernel.org References: <20161121125548.4730-1-johannes@sipsolutions.net> Cc: Johannes Berg From: Arend Van Spriel Message-ID: <576a08f1-3246-4e59-57a1-704e429674bd@broadcom.com> (sfid-20161121_135717_594028_9E3AD900) Date: Mon, 21 Nov 2016 13:57:08 +0100 MIME-Version: 1.0 In-Reply-To: <20161121125548.4730-1-johannes@sipsolutions.net> Content-Type: text/plain; charset=windows-1252 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 21-11-2016 13:55, Johannes Berg wrote: > From: Johannes Berg > > Arend inadvertedly inverted the logic while converting to > wdev_running(), fix that. It was indeed inadvertedly. Thanks, Arend > Fixes: 73c7da3dae1e ("cfg80211: add generic helper to check interface is running") > Signed-off-by: Johannes Berg > --- > net/wireless/nl80211.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c > index 4e9bda49e957..e4f718e956d7 100644 > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -10625,7 +10625,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)) >