From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Beilei Xing <beilei.xing@intel.com>, Jeff Guo <jia.guo@intel.com>,
Guinan Sun <guinanx.sun@intel.com>,
stable@dpdk.org, Adam Ludkiewicz <adam.ludkiewicz@intel.com>
Subject: [dpdk-stable] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable
Date: Mon, 27 Jul 2020 05:34:48 +0000 [thread overview]
Message-ID: <20200727053451.22214-6-guinanx.sun@intel.com> (raw)
In-Reply-To: <20200727053451.22214-1-guinanx.sun@intel.com>
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 <adam.ludkiewicz@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
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;
--
2.17.1
next parent reply other threads:[~2020-07-27 6:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200721074000.30449-1-guinanx.sun@intel.com>
[not found] ` <20200727053451.22214-1-guinanx.sun@intel.com>
2020-07-27 5:34 ` Guinan Sun [this message]
2020-07-27 6:45 ` Jeff Guo
[not found] ` <20200903044856.61961-1-guinanx.sun@intel.com>
2020-09-03 4:48 ` [dpdk-stable] [PATCH v3 05/15] " Guinan Sun
2020-09-03 4:48 ` [dpdk-stable] [PATCH v3 10/15] net/i40e/base: fix missing function header arguments Guinan Sun
2020-09-03 4:48 ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix Rx only mode for unicast promisc on VLAN Guinan Sun
2020-09-03 4:48 ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix PHY config param when enabling EEE Guinan Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200727053451.22214-6-guinanx.sun@intel.com \
--to=guinanx.sun@intel.com \
--cc=adam.ludkiewicz@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).