diff mbox

[1/1] gpn: drm: fsl_tcon: add missing of_node_put after calling of_parse_phandle

Message ID 1467618040-13799-1-git-send-email-peter.chen@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Chen July 4, 2016, 7:40 a.m. UTC
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.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefan Agner July 14, 2016, 5:50 a.m. UTC | #1
On 2016-07-04 00:40, Peter Chen wrote:
> 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.
> 
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
> b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
> index bbe34f1..bca09ea 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
> @@ -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
diff mbox

Patch

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
index bbe34f1..bca09ea 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
@@ -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");