vxge: cleanup probe error paths
authorJon Mason <jon.mason@exar.com>
Tue, 18 Jan 2011 15:02:19 +0000 (15:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Jan 2011 07:18:13 +0000 (23:18 -0800)
Reorder the commands to be in the inverse order of their allocations
(instead of the random order they appear to be in), propagate return
code on errors from pci_request_region and register_netdev, reduce the
config_dev_cnt and total_dev_cnt counters on remove, and return the
correct error code for vdev->vpaths kzalloc failures.  Also, prevent
leaking of vdev->vpaths memory and netdev in vxge_probe error path due
to freeing for these not occurring in vxge_device_unregister.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found