Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp569218rwd; Sun, 14 May 2023 02:19:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BbimTwiw5SXMfc84eRQpXwdVmZh3hOjr1I1IqdMrBrE0ypiJWDcNxKUdK8Cakk2YUZ6Ki X-Received: by 2002:a05:6a21:6d8a:b0:100:809b:d6b6 with SMTP id wl10-20020a056a216d8a00b00100809bd6b6mr31141938pzb.26.1684055945419; Sun, 14 May 2023 02:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684055945; cv=none; d=google.com; s=arc-20160816; b=k7z66hlH84snCCIZYKzFcTP9B3LaiB+sp6Fi7bV9COi3lgA1CmDFmAeQPH/fgd1BfG +VadV4xM8Z/2yVmT6u53hbOwhlVkr0Y9CmtUwbz9uJffLmN9+Z0bUp7/Erm00UoLSN7G dCyJOBoIZzPexDK1+xXA/t1rlUtnwWwgcJ93Rj/IqZWvhYshwA+JD2Y8HfyITxQidBIs eFWWlUfVLrZauEZootG2J2iqbDHxFXAkWChRPe6bX6r8WAxNLm52/STmjAOteE/mWUT1 p3tiBC/kPxU2af7N/3ZVQ9aofzuKJg/Jic0Gf0TakdSCTRPJhA9ZSH3WK6WfEpFKUJpW 4Blw== 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=3+KU8oMi4aISRuw8ZbheC226lirHumUDEFLF3SRxnMk=; b=XEbXxNxbLxYi69PvmlKTL8F29A/XxxKnyRa80NbtRGaVEgI+ElvFhw03YmVWKj7ZWd x7/Q5lTPQxh72Q6USZsTWdQG1T7wiMH1U9p6QVrfSEMMJwnfBxjh1FK/6KNr6kF1Y+p5 UkwhLfXnZypPR1ZPrE+mI6MHkzxNU4tquUx04beOoagl35PJD9rfwOg/HuvJ+are7x/N CRoJPtNVEmga+r7gbuMYA18iiRCiZfgIPdmDxW9IRdBrnYzyZxh8n8VR4NrVnVbW/EUT FgmYSmmqkVRpl+HKOKAo+jlzz3tGDgS0pGXZ7i5GEIpy9fUH4Db9EqYUaIhlwElOnN70 ZhBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mpQeKYlL; 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 b191-20020a6334c8000000b005303b08eb16si13798792pga.631.2023.05.14.02.18.58; Sun, 14 May 2023 02:19:05 -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=mpQeKYlL; 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 S235531AbjENJQg (ORCPT + 61 others); Sun, 14 May 2023 05:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233771AbjENJQc (ORCPT ); Sun, 14 May 2023 05:16:32 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF3591BE5 for ; Sun, 14 May 2023 02:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684055790; x=1715591790; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=R/dwJxZ4NKJJ8SDDhE5Tz6ANwNRNZNMHiyFjliirrQU=; b=mpQeKYlLj9ILwDYhqrnFMkcJAdVX0yyuooB+bvOyudzWebRjFIv7pGBK ga/ljiNiBR+FKeI0/DPG4AH11nKrLYanWNHMCYGrD574V/jX6/3KA6M7+ OTehuiK3y1Sn59Htith/zdJ13Haw58wctdtsVgnxQx1gWlmnv4kggZyQL K5o3n64BTTZUpMuI4QSo29XHqz5pbrNCpWbzm+Ktcbk/XCPIqpwL74bXd c0XqaA1gwQ1NcqJLikb9hJUG+AzHqUgoZha7iCysGFTSnTH1feRsyCqBS GnQkNoGWQxrZkwYZBmU/sjRgfycg+Al/KLx9K8LZdAFnxULAnA5+r1q13 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10709"; a="340366851" X-IronPort-AV: E=Sophos;i="5.99,274,1677571200"; d="scan'208";a="340366851" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2023 02:16:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10709"; a="731300406" X-IronPort-AV: E=Sophos;i="5.99,274,1677571200"; d="scan'208";a="731300406" Received: from seran-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.239.223]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2023 02:16:29 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Gregory Greenman Subject: [PATCH wireless 07/12] wifi: iwlwifi: mvm: fix initialization of a return value Date: Sun, 14 May 2023 12:15:50 +0300 Message-Id: <20230514120631.98b7e3aacf0b.I2fc274dd7e374ef7fac8e26d71c9cd73323da665@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230514091555.168392-1-gregory.greenman@intel.com> References: <20230514091555.168392-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 In iwl_mvm_mld_update_sta(), if the flow doesn't enter for_each_sta_active_link(), the default value is returned. Set this default to -EINVAL instead of 0 to better reflect this. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 19f1545b3c7e..85a4ce8449ad 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -728,7 +728,7 @@ int iwl_mvm_mld_update_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); struct ieee80211_link_sta *link_sta; unsigned int link_id; - int ret = 0; + int ret = -EINVAL; lockdep_assert_held(&mvm->mutex); -- 2.38.1