Ignore ENOENT from firmware without rewriting the return value.

The previous code assigned I40E_SUCCESS to ret in the ENOENT case,
but that value was never consumed before the next iteration or the
function return path.

Replace the positive ENOENT branch with a negative check so the
control flow stays the same without the unused assignment.

Coverity issue: 501831

Signed-off-by: Soumyadeep Hore <[email protected]>
---
 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 b891215191..5381071df2 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -7273,9 +7273,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");
                                goto DONE;
                        }
-- 
2.47.1

Reply via email to