]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbevf: ensure xdp_ring resources are free'd on error exit
authorColin Ian King <colin.king@canonical.com>
Tue, 27 Mar 2018 14:21:48 +0000 (15:21 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 24 Apr 2018 15:20:40 +0000 (08:20 -0700)
commit39035bfdc3f18987aba04165060bfbfa10ffc1cd
treeabb46089a85dbd46afdf7f60550b32c0b35031dd
parent9cf2f437ca5b39828984064fad213e68fc17ef11
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: 21092e9ce8b1 ("ixgbevf: Add support for XDP_TX action")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c