Skip to content

Commit 9c52de0

Browse files
Peter Chendavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5d97222 commit 9c52de0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/apm/xgene/xgene_enet_hw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ int xgene_enet_phy_connect(struct net_device *ndev)
772772

773773
phy_dev = of_phy_connect(ndev, np, &xgene_enet_adjust_link,
774774
0, pdata->phy_mode);
775+
of_node_put(np);
775776
if (!phy_dev) {
776777
netdev_err(ndev, "Could not connect to PHY\n");
777778
return -ENODEV;

0 commit comments

Comments
 (0)