Thread (31 messages) 31 messages, 7 authors, 2016-08-01

[PATCH 05/15] ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle

From: Peter Chen <hidden>
Date: 2016-07-27 02:45:36
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
---
 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index e8bc15b..5eb9d8c 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -960,6 +960,7 @@ static int octeon_mgmt_init_phy(struct net_device *netdev)
 	phydev = of_phy_connect(netdev, p->phy_np,
 				octeon_mgmt_adjust_link, 0,
 				PHY_INTERFACE_MODE_MII);
+	of_node_put(p->phy_np);
 
 	if (!phydev)
 		return -ENODEV;
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help