From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5C2D1A04D7 for ; Thu, 3 Sep 2020 06:55:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 207B41C11B; Thu, 3 Sep 2020 06:55:36 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id BE8B61C11B; Thu, 3 Sep 2020 06:55:33 +0200 (CEST) IronPort-SDR: qz5cq5LB8BrwU/Vc/d6MoCGXbgUuS+aSg4UZk76g6ZM25kKhLqULVsN11ne2mAyL+fz60M04A5 v0DdsAM0d/5g== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="221732239" X-IronPort-AV: E=Sophos;i="5.76,385,1592895600"; d="scan'208";a="221732239" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 21:55:33 -0700 IronPort-SDR: UCZbuxvB92I4e1hfXJvXcIqpBkAnkZEMnUmNDBjwEjlnc7mhao32ofB/YtiKJrEo89c6MM++Lv ny1nBsyh/Lhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,385,1592895600"; d="scan'208";a="315349272" Received: from dpdk.sh.intel.com ([10.239.255.12]) by orsmga002.jf.intel.com with ESMTP; 02 Sep 2020 21:55:31 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Beilei Xing , Jeff Guo , Guinan Sun , stable@dpdk.org, Adam Ludkiewicz Date: Thu, 3 Sep 2020 04:48:46 +0000 Message-Id: <20200903044856.61961-6-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200903044856.61961-1-guinanx.sun@intel.com> References: <20200727053451.22214-1-guinanx.sun@intel.com> <20200903044856.61961-1-guinanx.sun@intel.com> Subject: [dpdk-stable] [PATCH v3 05/15] net/i40e/base: fix possible uninitialized variable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Fix possible uninitialized variable in i40e in the i40e_get_lpi_counters function. Fixes: 429bdc0cd967 ("net/i40e/base: add function to read LPI counters") Cc: stable@dpdk.org Signed-off-by: Adam Ludkiewicz Signed-off-by: Guinan Sun Acked-by: Jeff Guo --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 46a0b7881..85c22849e 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -7097,7 +7097,7 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT, &cmd_status, tx_counter, rx_counter, NULL); - if (cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC) + if (!retval && cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC) retval = I40E_ERR_ADMIN_QUEUE_ERROR; return retval; -- 2.17.1