net: ethernet: mediatek: fix the missing of_node_put() after node is used done inside mtk_mdio_init

This patch adds the missing of_node_put() after finishing the usage
of of_get_child_by_name.

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>
This commit is contained in:
Sean Wang 2016-09-01 10:47:33 +08:00 committed by David S. Miller
parent 79e9a41438
commit b5776f01bf
1 changed files with 1 additions and 0 deletions

View File

@ -324,6 +324,7 @@ static int mtk_mdio_init(struct mtk_eth *eth)
err = of_mdiobus_register(eth->mii_bus, mii_np);
if (err)
goto err_free_bus;
of_node_put(mii_np);
return 0;