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>
This commit is contained in:
Jiapeng Zhong 2021-01-26 17:51:19 +08:00 committed by Rob Clark
parent 6ec9351809
commit dd5d08b5e5
1 changed files with 1 additions and 2 deletions

View File

@ -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);