diff mbox series

[V2,1/4] remoteproc: imx: add missing of_node_put

Message ID 1617082235-15923-2-git-send-email-peng.fan@oss.nxp.com (mailing list archive)
State Accepted
Commit 6e962bfe56b99843ab716dc8a9438039476c99e2
Headers show
Series remoteproc: imx: support remote cores booted early | expand

Commit Message

Peng Fan (OSS) March 30, 2021, 5:30 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

After of_parse_phandle, we need of_node_put to decrease the refcount
of the device_node.

Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/remoteproc/imx_rproc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mathieu Poirier April 7, 2021, 4:29 p.m. UTC | #1
On Tue, Mar 30, 2021 at 01:30:32PM +0800, peng.fan@oss.nxp.com wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> After of_parse_phandle, we need of_node_put to decrease the refcount
> of the device_node.
> 
> Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/remoteproc/imx_rproc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 6d3207ccbaef..077413319f58 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -459,6 +459,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
>  			return err;
>  		}
>  
> +		of_node_put(node);
> +

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

>  		if (b >= IMX7D_RPROC_MEM_MAX)
>  			break;
>  
> -- 
> 2.30.0
>
diff mbox series

Patch

diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 6d3207ccbaef..077413319f58 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -459,6 +459,8 @@  static int imx_rproc_addr_init(struct imx_rproc *priv,
 			return err;
 		}
 
+		of_node_put(node);
+
 		if (b >= IMX7D_RPROC_MEM_MAX)
 			break;