Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp945290pxb; Wed, 6 Apr 2022 05:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTjRdpLb22tBkmXv8yQ6OVmc+n5fL9bNcJfiFUAt3hvoR/rYhenRSu9RwSqP0wXcABtrYL X-Received: by 2002:a05:6638:218f:b0:321:3fa6:79b8 with SMTP id s15-20020a056638218f00b003213fa679b8mr4605583jaj.206.1649246531867; Wed, 06 Apr 2022 05:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649246531; cv=none; d=google.com; s=arc-20160816; b=qYZt3jpEL9soC36+UgjRzLB1YU53VupTYILHWIOEj7bw2F2PUwZTMggY3ClNU+4BHk QWDTMCCOjITJUqlrfbKHO3S4ocV/MGYAlIm6QnDNAMuHRBboaW13Z7wvSjuB6XVdU1j2 MsV8Povjhmo+BLRZyevPv9gufyKFzrPi17z3sySHidv9T98UEIcOFDQ9XCtsJcXj3WYK lmLViwMV6tSOG2I8jcuUNFbmRL6JINTH8cnepGIv23S6mq7+HpGdcMz03vL7EA1hcZkb kGZhb/7nng4bvN3DWd1vEXOcWuqFIMbqqXJU0kgyrPUWkxZ7qdtDESoHQxHkRqMt5Pjs 2e9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+i54wuuQDPLk8pK5BCZO8rHeZEDai2brFyDryPLMyi0=; b=SUfh0Yig7xXTompBrdrEIX67Gl/ODJVtAVCCqPFGFnNN3/IGyqc6S4sGhflyPMlQq/ 6ELw9npfBfOMglAzKRR3gl+Wtb++PZ40Nvp0gM/KVkPBxa7oVg+BP6/2c+HLSJQwDKu7 WDiQK6gnW2oSVUs+8aAInCgAfLpr9BmnyQNb3+vMCX0Wwchlsh7dp6yQokxEp77Y3LPY KLTgip5sPsaluuB5Ao7IAGwKx+4uQUt97BGrBzoAtzma3YcDFS8e9379zO7s2d7QmpUw FERddK84C9196m2QMTYZCpaKaFJ/s6FvjHZazn3g5qWwR8EoRrTfsGc+z2BHY7MYVOHK EgOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/1Fj+Ta"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m33-20020a056638272100b0031a2a4215easi9439623jav.12.2022.04.06.05.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:02:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M/1Fj+Ta"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F97045177B; Wed, 6 Apr 2022 03:28:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574622AbiDEW4p (ORCPT + 99 others); Tue, 5 Apr 2022 18:56:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349066AbiDEJtD (ORCPT ); Tue, 5 Apr 2022 05:49:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0376BA94F2; Tue, 5 Apr 2022 02:39:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 98D30B81B14; Tue, 5 Apr 2022 09:39:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F31EC385A1; Tue, 5 Apr 2022 09:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151578; bh=Z6EtSuCeXdh+PqwaoRlWSAWz4RHxvKlbnH7nuI5gNC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M/1Fj+Ta169HxbnUWcnDgOkRS9BUjeE8STfB0F2QMmSnjOZ0aiU8p28PKBUlBcgb5 yYTO9KZwCKr8NtThl1IgEof+5hwSOO2sazRk5lRErFTFlTUDBYEqZofOeBGyOV/O8h ZqiX3jXQrgrH/GIZlQWUJ/AZC00TS63t8UbBgRxk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Luca Coelho , Sasha Levin Subject: [PATCH 5.15 467/913] iwlwifi: mvm: Fix an error code in iwl_mvm_up() Date: Tue, 5 Apr 2022 09:25:29 +0200 Message-Id: <20220405070353.846025776@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit 583d18336abdfb1b355270289ff8f6a2608ba905 ] Return -ENODEV instead of success on this error path. Fixes: dd36a507c806 ("iwlwifi: mvm: look for the first supported channel when add/remove phy ctxt") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20210816183930.GA2068@kili Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index bcc032c815dc..6d439ae7b50b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -1489,8 +1489,10 @@ int iwl_mvm_up(struct iwl_mvm *mvm) while (!sband && i < NUM_NL80211_BANDS) sband = mvm->hw->wiphy->bands[i++]; - if (WARN_ON_ONCE(!sband)) + if (WARN_ON_ONCE(!sband)) { + ret = -ENODEV; goto error; + } chan = &sband->channels[0]; -- 2.34.1