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 D8A62A0524 for ; Mon, 27 Jul 2020 08:45:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABD6B1C0BC; Mon, 27 Jul 2020 08:45:31 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9CA9F1BFE8; Mon, 27 Jul 2020 08:45:28 +0200 (CEST) IronPort-SDR: 2Jaf6olZ+5waFlFk1FdjFomVwj/S5KHYPRYBkZ7YZFD1zqiXaXimthQMjCWw3OcvNQyyPIbXLC UnP7SMy1NzDQ== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="148846220" X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="148846220" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2020 23:45:27 -0700 IronPort-SDR: FVUJ22a8opmeLMmZyAwKVJITrq5fC2wDfinX2zxYV03zi9ucmWKM4ofCfqvcLIwuoYMrKWamLi Nk/qRiTo0i9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,401,1589266800"; d="scan'208";a="327919468" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.176]) ([10.67.68.176]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jul 2020 23:45:25 -0700 To: Guinan Sun , dev@dpdk.org Cc: Beilei Xing , stable@dpdk.org, Adam Ludkiewicz References: <20200721074000.30449-1-guinanx.sun@intel.com> <20200727053451.22214-1-guinanx.sun@intel.com> <20200727053451.22214-6-guinanx.sun@intel.com> From: Jeff Guo Message-ID: <0e4665e1-6d6b-025f-74c8-4b1ccad25b0f@intel.com> Date: Mon, 27 Jul 2020 14:45:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200727053451.22214-6-guinanx.sun@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-stable] [PATCH v2 5/8] 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" Acked-by: Jeff Guo On 7/27/2020 1:34 PM, Guinan Sun wrote: > 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 > --- > V2: > * Modify commit message. > --- > 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;