drivers: net: xgene: Fix error deconstruction path
authorIyappan Subramanian <isubramanian@apm.com>
Sat, 13 Aug 2016 05:05:40 +0000 (22:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 18:48:52 +0000 (11:48 -0700)
commitcecd6e510c65b25c9a3fcc09480f561189a7c3b8
tree00a13d7a33325acf7dd3d03fe7cf869d9c650ccf
parent15e32296e44738e6c8dff56c46fd18e9b4c9b6f6
drivers: net: xgene: Fix error deconstruction path

Since register_netdev() call in xgene_enet_probe() was moved down to
the end, it doesn't properly handle errors that may occur, by
deconstructing everything that was setup before the error occurred.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c