net: ethernet: mediatek: cleanup error path inside mtk_hw_init
authorSean Wang <sean.wang@mediatek.com>
Wed, 14 Sep 2016 15:13:17 +0000 (23:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2016 06:22:57 +0000 (02:22 -0400)
commit8a8a9e89f801ce5d3d1d57ac48db678caf072147
tree33043ea75cbd84f7b5fa393242b3d64b23eb4bf1
parentbf253fb72221cdd9dc31009056f269a420f7bbd9
net: ethernet: mediatek: cleanup error path inside mtk_hw_init

This cleans up the error path inside mtk_hw_init call, causing it able
to exit appropriately when something fails and also includes refactoring
mtk_cleanup call to make the partial logic reusable on the error path.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c