Skip to contentSkip to conversation

memory: emif: add missing of_node_put after calling of_parse_phandle

PATCH In review Peter Chen 2 participants 2 messages Jul 18, 2016

Subsystems (2)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH v2 1/1 memory: emif: 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.

---

Changes for v2:
- %s/of_put_node/of_node_put

 drivers/memory/emif.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/memory/emif.c +2 -0
index 04644e7..262c881 100644
@@ -1409,8 +1409,10 @@ static struct emif_data * __init_or_module of_get_memory_device_details(
 	goto out;
 
 error:
+	of_node_put(np_ddr);
 	return NULL;
 out:
+	of_node_put(np_ddr);
 	return emif;
 }
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 12 lines · Peter Chen

of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.

---

Changes for v2:
- %s/of_put_node/of_node_put

 drivers/memory/emif.c | 2 ++
 1 file changed, 2 insertions(+)

I will pick this up for next merge window...