ixgbevf: Refactor ring parameter re-size
authorGreg Rose <gregory.v.rose@intel.com>
Thu, 23 Sep 2010 12:46:25 +0000 (12:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Sep 2010 05:43:31 +0000 (22:43 -0700)
commitbba50b99b2410e863b38afdcd0280eb37f8a8bcc
tree82189c764ac0dacb10d6085b31100c0ae544881b
parent543876c92837a8b208b5c99ec225c1f5a581900e
ixgbevf: Refactor ring parameter re-size

The function to resize the Tx/Rx rings had the potential to
dereference a NULL pointer and the code would attempt to resize
the Tx ring even if the Rx ring allocation had failed.  This
would cause some confusion in the return code semantics.  Fixed
up to just unwind the allocations if any of them fail and return
an error.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbevf/ethtool.c