summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda/coda-common.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-16 16:04:49 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-24 16:28:41 +0300
commit94a426c56449e5dd18fe3bfb52077856d063e275 (patch)
tree3b2ec97d21586cf563f6874102aa12aeaacae50c /drivers/media/platform/coda/coda-common.c
parenta58c37978cf02f6d35d05ee4e9288cb8455f1401 (diff)
downloadlinux-94a426c56449e5dd18fe3bfb52077856d063e275.tar.xz
media: coda: remove redundant null pointer check before of_node_put
of_node_put has taken the null pointer check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang <zhongjiang@huawei.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/coda/coda-common.c')
-rw-r--r--drivers/media/platform/coda/coda-common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 0bffa1e02e58..6bff416eb825 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -376,8 +376,7 @@ static struct vdoa_data *coda_get_vdoa_data(void)
vdoa_data = ERR_PTR(-EPROBE_DEFER);
out:
- if (vdoa_node)
- of_node_put(vdoa_node);
+ of_node_put(vdoa_node);
return vdoa_data;
}