summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>2021-01-26 17:51:19 +0800
committerRob Clark <robdclark@chromium.org>2021-01-31 11:34:36 -0800
commitdd5d08b5e54d54563d2de0ef6aa959e47485d7da (patch)
treec3300ef8a64df8f8f6c36925382548bd90f23ae4 /drivers
parent6ec9351809612fa1c0256fb3e39b49b6100e2983 (diff)
downloadlinux-dd5d08b5e54d54563d2de0ef6aa959e47485d7da.tar.bz2
drm/msm: remove redundant NULL check
Fix below warnings reported by coccicheck: ./drivers/gpu/drm/msm/msm_gem.c:991:3-9: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com> Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 9d10739c4eb2..4f1f1a09ca89 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -987,8 +987,7 @@ void msm_gem_free_object(struct drm_gem_object *obj)
/* Don't drop the pages for imported dmabuf, as they are not
* ours, just free the array we allocated:
*/
- if (msm_obj->pages)
- kvfree(msm_obj->pages);
+ kvfree(msm_obj->pages);
put_iova_vmas(obj);