Skip to contentSkip to conversation

net/i40e: fix unused variable issue

PATCH Applied John McNamara 2 participants 2 messages Mar 11 – Mar 18 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: fix unused variable issue

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")
---
 drivers/net/intel/i40e/i40e_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/intel/i40e/i40e_ethdev.c +1 -3
index af736f59be..100a751225 100644
@@ -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;
 			}
Signature · 1 line
2.51.0