Skip to content

Commit

Permalink
ethernet: apm: xgene: add missing of_node_put after calling of_parse_…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Peter Chen authored and David S. Miller committed Aug 2, 2016
1 parent 5d97222 commit 9c52de0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c52de0

Please sign in to comment.