ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Mon, 1 Aug 2016 07:02:40 +0000 (15:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Aug 2016 04:43:49 +0000 (21:43 -0700)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index 7bd910ce8b346eec90433ae7c44b3719a0d14691..799d58d86e6dcb86fc23c125abbbbc317720e2b7 100644 (file)
@@ -1780,6 +1780,7 @@ static int sh_eth_phy_init(struct net_device *ndev)
                                        sh_eth_adjust_link, 0,
                                        mdp->phy_interface);
 
+               of_node_put(pn);
                if (!phydev)
                        phydev = ERR_PTR(-ENOENT);
        } else {