Skip to content

Commit 39035bf

Browse files
Colin Ian KingJeff Kirsher
authored andcommitted
ixgbevf: ensure xdp_ring resources are free'd on error exit
The current error handling for failed resource setup for xdp_ring data is a break out of the loop and returning 0 indicated everything was OK, when in fact it is not. Fix this by exiting via the error exit label err_setup_tx that will clean up the resources correctly and return and error status. Detected by CoverityScan, CID#1466879 ("Logically dead code") Fixes: 21092e9 ("ixgbevf: Add support for XDP_TX action") Signed-off-by: Colin Ian King <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 9cf2f43 commit 39035bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3420,7 +3420,7 @@ static int ixgbevf_setup_all_tx_resources(struct ixgbevf_adapter *adapter)
34203420
if (!err)
34213421
continue;
34223422
hw_dbg(&adapter->hw, "Allocation for XDP Queue %u failed\n", j);
3423-
break;
3423+
goto err_setup_tx;
34243424
}
34253425

34263426
return 0;

0 commit comments

Comments
 (0)