Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5755108rwd; Mon, 12 Jun 2023 09:10:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4oFbbWEHYHNg+wEeoUI9vQ6iTc1T9iPLJQOkWxBRuOnvh4c5h8bOeKZcLdHg4BQ/oMT8ry X-Received: by 2002:a05:6402:1d56:b0:514:9311:e83a with SMTP id dz22-20020a0564021d5600b005149311e83amr7181700edb.8.1686586242283; Mon, 12 Jun 2023 09:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686586242; cv=none; d=google.com; s=arc-20160816; b=tDishLdQXTE9KGQjI08oN1ssJrg9PV6XfTMC7qBrlJs7Npn+SDWIMtyyV0Wu5Rw6Et 1nFAYYseVTS29CAEpBNCMQ+FeOD3r2U1DzDKMNncC/OdRspWEQQ7hmy0toOuqWGq5mu0 5QV8pLK8W9PMXsAoCAfP6g/1XbFePJXof3pdknz36vd/YsekqCYOiTSVCLVrnb7aWD6d WisA9R/5ZXnpz0Wm0pNCg9QVgx+q0GtxS8ljNmIb04hzbGaGie032NwkDp3T9FZ0A2BR Tian+KtSXRKnapIBxzXwdCGmvKJN/hN+NGmn0Db/JWrbRf06YHMUjs42GsZiaMzzEKVm C3cA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g1eg0s3/twHZykHpqvRtEwqvwZWxp3ugoOogsQmbxNA=; b=z6UBTAJKAAsRwZ80olR5jvPEi+1hLMWDiVZ/nwjSawNEUCM3aNWmUj2/sFO3+2Jii9 rW9poj30sXbrYUIdOs8gzy7koxYJg/m1PSAw1rOm5mp+wlk/2Xn2+fRVS9vpdESSldfN dtSTllCF9ZValbAOtyw9RE47jrJVrpHIgUeviVbn1ZQpRE0tSeDCRppVxhUK3t0F+cUb s2X13r1wlVECBejPD/EVMmb6JQ/dYRiaynlXceqBL1PhNbGcVhRPa5mV/SMnHHXVItHo DaYo+AMt/umyTW6PoFk/xVmxgVbJoonpZM+8rLCz9yVqUS2ZyV/17tZPKeFNWx0Nv8uZ lNug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d7iOKcg6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020aa7d517000000b00514b2458131si6062181edq.502.2023.06.12.09.10.26; Mon, 12 Jun 2023 09:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d7iOKcg6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237876AbjFLPvi (ORCPT + 62 others); Mon, 12 Jun 2023 11:51:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238033AbjFLPvh (ORCPT ); Mon, 12 Jun 2023 11:51:37 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3BF510CE for ; Mon, 12 Jun 2023 08:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686585096; x=1718121096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D2Gh94pkpN8FJUR2yp0kV3KVimspFOfNZKYKGERWR+A=; b=d7iOKcg6043yuBq9fwSUlD1gBmbudcCQv7iw3WRNotETRLraaNcKd2vg T++OZUPohd5voGKqdra4+Dq1ErExJrwlIaQJpyt3xvByQiKss6oc1po6m 1PTEXFVX3jzUmKtPTelBbJr8IVCwfYhXBFQ0qBmv/7giuLlk3c6UzrFaB hdvWwMBQSQD81iLEW+spATSUFPrVBkVCgr4MHRnGO1CYZsO8ilpFUlte4 lhX4Mh69y4HtVQ09/Xwp461MoAqZdAOaD8iMht2V/vucfcptHqFdRTX+w yk408esT3NQoawhogiH6BUzsxrQsVtSOBer9fDUdJ130qOXGHAKXYP2iJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="421674184" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="421674184" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 08:51:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="885499261" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="885499261" Received: from azvuluno-mobl2.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.202.109]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 08:51:34 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Gregory Greenman Subject: [PATCH 03/15] wifi: iwlwifi: mvm: Handle return value for iwl_mvm_sta_init Date: Mon, 12 Jun 2023 18:51:04 +0300 Message-Id: <20230612184434.1ecd293539e8.I5ec6aab387bb2fe743a7402581beaeb9c801d31f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230612155116.168000-1-gregory.greenman@intel.com> References: <20230612155116.168000-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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-wireless@vger.kernel.org From: Mukesh Sisodiya sta_init function can fail and if it returns an error then driver should not send the request to fw to add a station. Fixes: 69aef848052b ("wifi: iwlwifi: mvm: refactor iwl_mvm_add_sta(), iwl_mvm_rm_sta()") Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index b9b9082676d4..5e11b101d02e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1859,6 +1859,8 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm, ret = iwl_mvm_sta_init(mvm, vif, sta, sta_id, sta->tdls ? IWL_STA_TDLS_LINK : IWL_STA_LINK); + if (ret) + goto err; update_fw: ret = iwl_mvm_sta_send_to_fw(mvm, sta, sta_update, sta_flags); -- 2.38.1