From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 082AF458CD; Mon, 2 Sep 2024 11:57:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFF3E40BA5; Mon, 2 Sep 2024 11:55:42 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id 95D794066D for ; Mon, 2 Sep 2024 11:55:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725270920; x=1756806920; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M1GWJdfjKtydFqt2gbNVk/m/DH8u/QEzMCyLegnXPxY=; b=Vr/YxbyLUg17mjNculFbYs3VI37odlTH5ZOHS4OgV7D2REJSQyuZQgAJ j68RGfxfURRYa60uM1bxmTFCakp08xcB3JMVJARrVfQT+QLDoWBFk4sXh upSQNdMRUTIslMXa8AOvfluBYhtPMyzHmGleTYXC9B346hk3ZnaumWNdQ 4GYAu4JtJ31j+ndsqHZACkc5DF9xTIpJ9+rNf9r9oXYsmdJ2WXL12U5wc EgBLFsKg4pYoKE33pEfDKuIs0bDvH0d47sionT8Tqq2vvAxZ3s5XUmYUb nS+HLK1j57L/6wNC7VIF4jX++CTdE3wV421wxkm4KR36gtWhss0ZfXpqs A==; X-CSE-ConnectionGUID: j6Um5ZM0RIe006hwBbXEBw== X-CSE-MsgGUID: OhKWAeJCShCxdYn5vMXIYQ== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="26747246" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="26747246" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 02:55:20 -0700 X-CSE-ConnectionGUID: k/aToYF6Try5cEpvEk1XcQ== X-CSE-MsgGUID: NtmBSZskQdinitMCrZwVFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="64597974" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa009.fm.intel.com with ESMTP; 02 Sep 2024 02:55:19 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH v1 22/30] net/i40e/base: fix unchecked return value Date: Mon, 2 Sep 2024 10:54:34 +0100 Message-ID: <92a371a5f9513273d9d9bff862e56671afb6a925.1725270827.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Barbara Skobiej Static analysis tools have reported an unchecked return value warning. Address the warning by checking return value. Signed-off-by: Barbara Skobiej Signed-off-by: Anatoly Burakov --- drivers/net/i40e/base/i40e_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 416f31dcc3..07e18deaea 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -4215,8 +4215,8 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, /* use AQ read to get the physical register offset instead * of the port relative offset */ - i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL); - if (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK)) + status = i40e_aq_debug_read_register(hw, port_cfg_reg, &port_cfg, NULL); + if ((status == I40E_SUCCESS) && (!(port_cfg & I40E_PRTGEN_CNF_PORT_DIS_MASK))) hw->num_ports++; } -- 2.43.5