patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable
       [not found] ` <20200727053451.22214-1-guinanx.sun@intel.com>
@ 2020-07-27  5:34   ` Guinan Sun
  2020-07-27  6:45     ` Jeff Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Guinan Sun @ 2020-07-27  5:34 UTC (permalink / raw)
  To: dev; +Cc: Beilei Xing, Jeff Guo, Guinan Sun, stable, Adam Ludkiewicz

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable
  2020-07-27  5:34   ` [dpdk-stable] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable Guinan Sun
@ 2020-07-27  6:45     ` Jeff Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Guo @ 2020-07-27  6:45 UTC (permalink / raw)
  To: Guinan Sun, dev; +Cc: Beilei Xing, stable, Adam Ludkiewicz

Acked-by: Jeff Guo<jia.guo@intel.com>

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 <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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200721074000.30449-1-guinanx.sun@intel.com>
     [not found] ` <20200727053451.22214-1-guinanx.sun@intel.com>
2020-07-27  5:34   ` [dpdk-stable] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable Guinan Sun
2020-07-27  6:45     ` Jeff Guo

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox