[media] media: platform: ti-vpe: call of_node_put on non-null pointer
authorPeter Chen <[email protected]>
Fri, 15 Jul 2016 09:33:06 +0000 (06:33 -0300)
committerMauro Carvalho Chehab <[email protected]>
Fri, 18 Nov 2016 16:23:33 +0000 (14:23 -0200)
It should call of_node_put on non-null poiner.

Cc: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Acked-by: Benoit Parrot <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/platform/ti-vpe/cal.c

index b2d166b2221abfd21554d01472fddf791a24fac2..7a058b6e03d0ff2f6cdc6699912d3809c8824309 100644 (file)
@@ -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;