]> 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)
commit04ebf06bd86e3194b17636c1980567880773de1b
tree1b4b0a64b8f3f9af90841233f25d1a329350c626
parent824649a2918ba97e2e0c9fe328498b63bfdcbae6
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