From b68002db13f57b16b6b9f9841d40b867c298ffe4 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Fri, 15 Jul 2016 06:33:06 -0300 Subject: [media] media: platform: ti-vpe: call of_node_put on non-null pointer It should call of_node_put on non-null poiner. Cc: Mauro Carvalho Chehab Signed-off-by: Peter Chen Acked-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/ti-vpe/cal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/media/platform') diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index b2d166b2221a..7a058b6e03d0 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -1745,13 +1745,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; -- cgit v1.2.3