]> git.openfabrics.org - ~emulex/infiniband.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)
commitde3d5b94bc891c405b8d91d3c112681a0654613f
tree1b4b0a64b8f3f9af90841233f25d1a329350c626
parentbefa2af778b5cf5737eea3e3ff370c4f46d3f131
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