Skip to content

Commit

Permalink
ethernet: altera: add missing of_node_put
Browse files Browse the repository at this point in the history
of_node_put needs to be called when the device node which is got
from of_parse_phandle (or of_node_get) 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 0a2f0d2 commit 5d97222
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/altera/altera_tse_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ static int init_phy(struct net_device *dev)
phydev = of_phy_connect(dev, phynode,
&altera_tse_adjust_link, 0, priv->phy_iface);
}
of_node_put(phynode);

if (!phydev) {
netdev_err(dev, "Could not find the PHY\n");
Expand Down

0 comments on commit 5d97222

Please sign in to comment.