summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorzhong jiang2018-09-16 15:16:51 +0200
committerMauro Carvalho Chehab2018-09-24 15:28:41 +0200
commit58513d48494d4153cc1df81aa7dfb0ec844731f8 (patch)
treed6de75a22eb0f47c9c39d9b2877d79104ec9d147 /drivers/media/platform
parentmedia: coda: remove redundant null pointer check before of_node_put (diff)
downloadkernel-qcow2-linux-58513d48494d4153cc1df81aa7dfb0ec844731f8.tar.gz
kernel-qcow2-linux-58513d48494d4153cc1df81aa7dfb0ec844731f8.tar.xz
kernel-qcow2-linux-58513d48494d4153cc1df81aa7dfb0ec844731f8.zip
media: platform: remove redundant null pointer check before of_node_put
of_node_put has taken the null pinter check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/ti-vpe/cal.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index cc052b28e3d3..5f9d4e016d43 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1747,14 +1747,10 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
}
cleanup_exit:
- if (remote_ep)
- of_node_put(remote_ep);
- if (sensor_node)
- of_node_put(sensor_node);
- if (ep_node)
- of_node_put(ep_node);
- if (port)
- of_node_put(port);
+ of_node_put(remote_ep);
+ of_node_put(sensor_node);
+ of_node_put(ep_node);
+ of_node_put(port);
return ret;
}