From: Peter Chen Date: Mon, 1 Aug 2016 07:02:30 +0000 (+0800) Subject: ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c52de036bcbd07596f0fa74eac1e653b7449de3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c index 7714b7d4026a..37a0f463b8de 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c @@ -772,6 +772,7 @@ int xgene_enet_phy_connect(struct net_device *ndev) phy_dev = of_phy_connect(ndev, np, &xgene_enet_adjust_link, 0, pdata->phy_mode); + of_node_put(np); if (!phy_dev) { netdev_err(ndev, "Could not connect to PHY\n"); return -ENODEV;