summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-03-23 05:46:12 +0300
committerLucas Stach <l.stach@pengutronix.de>2021-05-03 17:12:26 +0300
commitbdf622e0fade2cec72c948c708763378b656c01d (patch)
treef30de261e12bffda74080fda6b402a8f3f0bb9b7 /drivers/gpu/drm/etnaviv
parent7d614ab2f20503ed8766363d41f8607337571adf (diff)
downloadlinux-bdf622e0fade2cec72c948c708763378b656c01d.tar.xz
drm/etnaviv: Remove redundant NULL check
Fix the following coccicheck warnings: ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:622:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:618:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:616:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index d05c35994579..bd0d66ebf314 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -612,14 +612,10 @@ err_submit_ww_acquire:
err_submit_cmds:
if (ret && (out_fence_fd >= 0))
put_unused_fd(out_fence_fd);
- if (stream)
- kvfree(stream);
- if (bos)
- kvfree(bos);
- if (relocs)
- kvfree(relocs);
- if (pmrs)
- kvfree(pmrs);
+ kvfree(stream);
+ kvfree(bos);
+ kvfree(relocs);
+ kvfree(pmrs);
return ret;
}