From: Guinan Sun Date: Mon, 27 Jul 2020 05:34:48 +0000 (+0000) Subject: net/i40e/base: fix possible uninitialized variable X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d112d16044ac49bbb0a01da525b8408a29a656f;p=dpdk.git net/i40e/base: fix possible uninitialized variable 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 --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 46a0b78816..85c22849e1 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;