From: Sean Wang Date: Thu, 1 Sep 2016 02:47:33 +0000 (+0800) Subject: net: ethernet: mediatek: fix the missing of_node_put() after node is used done inside... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b5776f01bf1f36a6c89c6dc407dda6509002e0d7;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: John Crispin Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 556951e66978..409efcf9b5c8 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -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;