diff options
author | Peter Chen <peter.chen@nxp.com> | 2016-08-01 09:02:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-02 06:43:47 +0200 |
commit | 9c52de036bcbd07596f0fa74eac1e653b7449de3 (patch) | |
tree | ac87b09b08acebe7a76e708e9acefd9e4c29ff32 | |
parent | ethernet: altera: add missing of_node_put (diff) | |
download | linux-9c52de036bcbd07596f0fa74eac1e653b7449de3.tar.xz linux-9c52de036bcbd07596f0fa74eac1e653b7449de3.zip |
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 <peter.chen@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |