]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources calls
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 18 May 2012 06:33:47 +0000 (06:33 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 18 Jul 2012 01:50:52 +0000 (18:50 -0700)
commit63e587dc165f212ce0d3e83cd94169828eb8c487
tree1b4b0a64b8f3f9af90841233f25d1a329350c626
parent061af63e6a4bc995f7a59cd8032c5c21186af941
ixgbe: Handle failures in the ixgbe_setup_rx/tx_resources calls

Previously we were exiting without cleaning up the memory internally on the
ixgbe_setup_rx_resources and ixgbe_setup_tx_resources calls.  Instead of
forcing the caller to clean things up for us we should instead just unwind
the rings and free the memory as we go.  This way we can more gracefully
clean up the rings in the event of an allocation failure.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c