[PATCH v1] net/i40e: fix unused variable issue

John McNamara
2026-03-11T16:20:03Z

Fix issue where I40E_SUCCESS was assigned to a return variable
but was overwritten before it could be used.

Coverity issue: 501831
Fixes: baf1d4cd8aed ("net/i40e: upgrade AQ command of MAC/VLAN remove")
Cc: stable@dpdk.org

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
drivers/net/intel/i40e/i40e_ethdev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index af736f59be..100a751225 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -7243,9 +7243,7 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi,

if (ret != I40E_SUCCESS) {
/* Do not report as an error when firmware returns ENOENT */
- if (aq_status == I40E_AQ_RC_ENOENT) {
- ret = I40E_SUCCESS;
- } else {
+ if (aq_status != I40E_AQ_RC_ENOENT) {
PMD_DRV_LOG(ERR, "Failed to remove macvlan filter");
return ret;
}
--
2.51.0