Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp953307ybe; Wed, 11 Sep 2019 07:15:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1SwBEseXDHSWoxHxzQiaCnOHVTf2yBmdNDDZD7QcmDADCz4nO56Qt1TUuneY0D4kD0pj8 X-Received: by 2002:a17:906:82da:: with SMTP id a26mr30496947ejy.20.1568211312926; Wed, 11 Sep 2019 07:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568211312; cv=none; d=google.com; s=arc-20160816; b=IZOjw1ySr3uyZDRLmAaoGudNOxSvFqimK6iAf42OnraWS2KYmX0pIIh1lWtDnpqd7E AU5d4XPcqzuacxh5eUe2D8O3PBNcC7G8x3M+isQrFYKif2MqbYMT5RhzvEpqa19/vu97 OHsdHhrltfTlgaLyTdp1dZqyWlbkMZMpdrYgwlmNV8vA8N7K3qHJ4u/F7VacKCTYHqzY T98ZUU0PsGejX4IVOmr+UR9D6snkqViE/yppuaHWCaA+ZoIcNLhmxWJ1QNyGC7xo3ZZO Jk1y7U/IOAjbhdpnLVI1x6rCw7/hlDrVsVNI+nm10jf4Lbt/igYZEv8oD//5E+FViv3J B9rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=+cIXqEJuYpA0+Q8sRtzqfZF30sEabB61l9AAF9nu7w8=; b=0KQnf9bwiy/vv1bxaVgADtCcsdc6qvxQQ0fGTsNDd4uw3xwD5WMFGOms6hjWBBXZnM xm8fuBZFJTXNpBPdBVNUI1M38bz7njp1jrAZ68OB9hp1OTtKozEZ7lK3QrH+fsZKdGBR 5q8tRmzXVNGNDpyKpHQOMwd0SBSDLnOQkUm24tSHAzmMJaE8D1hzl8vMokp0DDFjIEE5 E/fBD2+8LwN70ovqplELNeD+FPoGKD5VXPj7BAb0McjEtDVuuH18k2sPNjIW9BAHK2L5 xqfTe0mV7HgU6eGyu5OESOF8whVNwYKym5/cOu7QUT4uNdrJBPzbAyxGsj03U0DfRQjO zsig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ncentric-com.20150623.gappssmtp.com header.s=20150623 header.b=1w4BZWxg; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ncentric.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si11288171eja.191.2019.09.11.07.14.47; Wed, 11 Sep 2019 07:15:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ncentric-com.20150623.gappssmtp.com header.s=20150623 header.b=1w4BZWxg; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ncentric.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbfIKOOi (ORCPT + 99 others); Wed, 11 Sep 2019 10:14:38 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:39535 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfIKOOi (ORCPT ); Wed, 11 Sep 2019 10:14:38 -0400 Received: by mail-ed1-f67.google.com with SMTP id u6so20774473edq.6 for ; Wed, 11 Sep 2019 07:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+cIXqEJuYpA0+Q8sRtzqfZF30sEabB61l9AAF9nu7w8=; b=1w4BZWxgJw5sYsf/oizvm5Y1vZsVCuO6CczfYzJmOcFZVOrDWaqS6jCUj31CX2g/vo M0RNlo39TaZQuv5AS6JZGfhJDORORN+HHb+ccywhzGtqE73gdsEKg7zXAZPOtCYk1+er 1w0SyS5bEmy5QatqCQm1smp/wO/JmDQ3afjXezPjwRZxdqg48uAyMTW+0Gq4yGS8yhfz M1RNFyh4/OqzVXVmTtKd7oTrLeRcvpOjtM6zsstXQ3drTDF/J5UyXOdyfZgbs0KK3hbJ T/RdEGapuKajCekomdr2i5HnYT9FlR5Avd4+QhQB7wNquQTaZi+KyGtbYk+CfwQc+Flp WS6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+cIXqEJuYpA0+Q8sRtzqfZF30sEabB61l9AAF9nu7w8=; b=qKinzh2vT/juvAbk8XfVFFmeqkBOIZvfd1sZnAqYAlujd7qYQTqWX65A/sc2ZUu/35 FF6igNiiHdg4F40elRg5lOG/L99ryL8V7V04u8Kj2fenFvJ2pIZeCwaWjNWhJZetU9A6 7IjTGNJJghk4ntG1uh8x3ltEafKUTBDPWwIY5rTsu5yf2vvbhg3DSf0uzIioMFfyQE2B Fj+x3Wt/boQ+5Q8uW0C7Mbj1zCoJM/MioAaS4Ls0lMWZT9ZtQLnLwWFG0i9tts8TKLBt iixJFHhJ623D3Zac66bATUgAZAmoQjvEXtN/3nudAKi6P8lACdlBAEjeQj1rAOKOq8W+ dYeQ== X-Gm-Message-State: APjAAAWpBAfUEW8i+kLxT/h7sZ3HWq0bsorIEMJk7jYUTRhy3jD7hKvC 5PalaGjqmX91eUz0aTp2+8SbSXNQmv4= X-Received: by 2002:a05:6402:2d0:: with SMTP id b16mr38007788edx.147.1568211276171; Wed, 11 Sep 2019 07:14:36 -0700 (PDT) Received: from kvdp-BRIX.cmb.citymesh.com (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.gmail.com with ESMTPSA id g20sm1156821ejs.15.2019.09.11.07.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 07:14:35 -0700 (PDT) From: Koen Vandeputte To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Koen Vandeputte Subject: [PATCH] mac80211: IBSS: avoid unneeded return value processing Date: Wed, 11 Sep 2019 16:14:31 +0200 Message-Id: <20190911141431.12498-1-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.17.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org when ieee80211_ibss_csa_beacon() fails, we return it's value. When it succeeds, we basically copy it's value and also .. return it. Just return it immediately, simplifying the code. Signed-off-by: Koen Vandeputte --- net/mac80211/ibss.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 0a6ff01c68a9..d40744903fa9 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -538,7 +538,6 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) { struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; struct cfg80211_bss *cbss; - int err, changed = 0; sdata_assert_lock(sdata); @@ -560,13 +559,7 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) ifibss->chandef = sdata->csa_chandef; /* generate the beacon */ - err = ieee80211_ibss_csa_beacon(sdata, NULL); - if (err < 0) - return err; - - changed |= err; - - return changed; + return ieee80211_ibss_csa_beacon(sdata, NULL); } void ieee80211_ibss_stop(struct ieee80211_sub_if_data *sdata) -- 2.17.1