diff options
author | Peter Chen <peter.chen@nxp.com> | 2016-08-01 15:02:33 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-01 21:43:48 -0700 |
commit | 46997066ffed342166b49ed8ebb76eb40b2f2b24 (patch) | |
tree | 5057ac5c38cf8794e6bc153dda379103901c893c /drivers | |
parent | 8d00201a2e73cf49b5322a5c3b92c44dac586a7b (diff) | |
download | linux-46997066ffed342166b49ed8ebb76eb40b2f2b24.tar.bz2 |
ethernet: cavium: octeon: 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c index e8bc15bcde70..4ab404f45b21 100644 --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c @@ -1513,6 +1513,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev) return 0; err: + of_node_put(p->phy_np); free_netdev(netdev); return result; } @@ -1520,8 +1521,10 @@ err: static int octeon_mgmt_remove(struct platform_device *pdev) { struct net_device *netdev = platform_get_drvdata(pdev); + struct octeon_mgmt *p = netdev_priv(netdev); unregister_netdev(netdev); + of_node_put(p->phy_np); free_netdev(netdev); return 0; } |