From patchwork Thu Sep 21 08:58:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 725204 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60673E7D0A2 for ; Thu, 21 Sep 2023 19:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbjIUTuq (ORCPT ); Thu, 21 Sep 2023 15:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbjIUTug (ORCPT ); Thu, 21 Sep 2023 15:50:36 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E85B7697BA for ; Thu, 21 Sep 2023 10:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695318642; x=1726854642; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=byABH+hsUoi5S/yMfj0RVxmAy470GYhDMUlm2zglCGo=; b=mSkCKAQwPx5c9FdLMS2VQCXXJqOQ98iRsU65P6DIX0uMf/Zetv7XCqO1 wrsNP6M7OUX6ygBXpdxBIGDF8zbpaLMxdBcBhSJ1/mS6E2YG4ThPYSeKD Dyc+EGy6JRQOj4/YV0/SQfcb2Z88AvgQ3T63Jc13LHpJrlU0LiF0uEyNR Wxek2eR/mwppd0OZFxKP/gKCRCTdlHt4B1859gbHTprE3NdzYKewE11ne f0sLtZrLWbhjgplEn3qHXqaCW0cah6fbf/dC86hhAM4vzD19XhVxNxK55 gwnGVY505qqyS5FkPpKnFR7DD4RhVJ2h7I2J3a1RYWgJZ0YWxAONkuZiu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="384305474" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="384305474" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 01:59:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="740545656" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="740545656" Received: from rchuwer-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.229.163]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 01:59:06 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 11/12] wifi: iwlwifi: mvm: check for iwl_mvm_mld_update_sta() errors Date: Thu, 21 Sep 2023 11:58:09 +0300 Message-Id: <20230921110727.a9496c232d48.I74adaa8f3c6fd3252348e79f18605246936ef27d@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230921085810.693048-1-gregory.greenman@intel.com> References: <20230921085810.693048-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg The return value of this function is assigned, but then unused. Check for errors here. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 4e9d19eb31f1..1464aad039e1 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -697,6 +697,8 @@ int iwl_mvm_mld_add_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, /* at this stage sta link pointers are already allocated */ ret = iwl_mvm_mld_update_sta(mvm, vif, sta); + if (ret) + goto err; for_each_sta_active_link(vif, sta, link_sta, link_id) { struct ieee80211_bss_conf *link_conf =