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)
commit6cca200362b46a6845b3f07367f5068a427161e1
tree7f61585e158691935618afa591219ae343d27b8c
parent80f8f1027b99660897bdeaeae73002185d829906
vxge: cleanup probe error paths

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>
drivers/net/vxge/vxge-main.c