net: ethernet: mediatek: fix the missing of_node_put() after node is used done inside...
authorSean Wang <sean.wang@mediatek.com>
Thu, 1 Sep 2016 02:47:33 +0000 (10:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Sep 2016 03:53:48 +0000 (20:53 -0700)
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>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index 556951e66978526da2647e6c9fbfd068ee090b72..409efcf9b5c85c95a03eb02863c52e1d0e2bffbb 100644 (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;