]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: coda: remove redundant null pointer check before of_node_put
authorzhong jiang <zhongjiang@huawei.com>
Sun, 16 Sep 2018 13:04:49 +0000 (09:04 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 24 Sep 2018 13:28:41 +0000 (09:28 -0400)
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>
drivers/media/platform/coda/coda-common.c

index 0bffa1e02e58be38a56e4e6d01ac143d304adbfd..6bff416eb825640ecc528a8ee04f87855d300352 100644 (file)
@@ -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;
 }