Skip to content

Commit

Permalink
net: ethernet: mediatek: fix logic unbalance between probe and remove
Browse files Browse the repository at this point in the history
original mdio_cleanup is not in the symmetric place against where
mdio_init is, so relocate mdio_cleanup to the right one.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sean Wang authored and David S. Miller committed Sep 1, 2016
1 parent d3bd1ce commit 7c6b0d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,6 @@ static void mtk_uninit(struct net_device *dev)
struct mtk_eth *eth = mac->hw;

phy_disconnect(mac->phy_dev);
mtk_mdio_cleanup(eth);
mtk_irq_disable(eth, ~0);
}

Expand Down Expand Up @@ -1916,6 +1915,7 @@ static int mtk_remove(struct platform_device *pdev)
netif_napi_del(&eth->tx_napi);
netif_napi_del(&eth->rx_napi);
mtk_cleanup(eth);
mtk_mdio_cleanup(eth);
platform_set_drvdata(pdev, NULL);

return 0;
Expand Down

0 comments on commit 7c6b0d7

Please sign in to comment.