Commit 9c52de03 authored by Peter Chen's avatar Peter Chen Committed by David S. Miller

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: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d97222a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment