diff mbox

[1/1] media: platform: ti-vpe: call of_node_put on non-null pointer

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

Commit Message

Peter Chen July 15, 2016, 9:33 a.m. UTC
It should call of_node_put on non-null poiner.

Cc: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/media/platform/ti-vpe/cal.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Benoit Parrot July 28, 2016, 8:46 p.m. UTC | #1
Peter Chen <peter.chen@nxp.com> wrote on Fri [2016-Jul-15 17:33:06 +0800]:
> It should call of_node_put on non-null poiner.

Good catch, thanks.

Acked-by: Benoit Parrot <bparrot@ti.com>

> 
> Cc: linux-media@vger.kernel.org
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Benoit Parrot <bparrot@ti.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/media/platform/ti-vpe/cal.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
> index 82001e6..00c3e97 100644
> --- a/drivers/media/platform/ti-vpe/cal.c
> +++ b/drivers/media/platform/ti-vpe/cal.c
> @@ -1761,13 +1761,13 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
>  	}
>  
>  cleanup_exit:
> -	if (!remote_ep)
> +	if (remote_ep)
>  		of_node_put(remote_ep);
> -	if (!sensor_node)
> +	if (sensor_node)
>  		of_node_put(sensor_node);
> -	if (!ep_node)
> +	if (ep_node)
>  		of_node_put(ep_node);
> -	if (!port)
> +	if (port)
>  		of_node_put(port);
>  
>  	return ret;
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index 82001e6..00c3e97 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1761,13 +1761,13 @@  static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
 	}
 
 cleanup_exit:
-	if (!remote_ep)
+	if (remote_ep)
 		of_node_put(remote_ep);
-	if (!sensor_node)
+	if (sensor_node)
 		of_node_put(sensor_node);
-	if (!ep_node)
+	if (ep_node)
 		of_node_put(ep_node);
-	if (!port)
+	if (port)
 		of_node_put(port);
 
 	return ret;