Skip to contentSkip to conversation

gpn: drm: fsl_tcon: add missing of_node_put after calling of_parse_phandle

PATCH Applied Peter Chen 2 participants 2 messages Jul 4, 2016 – Jul 14, 2016

Subsystems (3)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH 1/1 gpn: drm: fsl_tcon: 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, but current code only calls it at error path, fix it by adding it at correct code path.

---
 drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1 -0
index bbe34f1..bca09ea 100644
@@ -92,6 +92,7 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
 		goto err_node_put;
 	}
 
+	of_node_put(np);
 	clk_prepare_enable(tcon->ipg_clk);
 
 	dev_info(dev, "Using TCON in bypass mode\n");
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 15 lines · Peter Chen

of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using, but current code only calls it at error path, fix it by adding it at correct code path.

---
 drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +0 -0
index bbe34f1..bca09ea 100644

drivers/gpu/drm/fsl-dcu/fsl_tcon.c struct fsl_tcon *fsl_tcon_init(struct device *dev) · line 98

Quoted 7 lines
drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1 -0
@@ -92,6 +92,7 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
 		goto err_node_put;
 	}
 
+	of_node_put(np);
 	clk_prepare_enable(tcon->ipg_clk);
 
 	dev_info(dev, "Using TCON in bypass mode\n");

Thanks, applied!

Changed subject prefix using the usual drm/fsl-dcu:...

--
Stefan
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel