Message ID | 1611632785-9462-1-git-send-email-tiantao6@hisilicon.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | drm/msm: fix NULL check before some freeing functions is not needed | expand |
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 45e2312..8eb2c66 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -985,8 +985,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); /* dma_buf_detach() grabs resv lock, so we need to unlock * prior to drm_prime_gem_destroy
fixed the below warning: ./drivers/gpu/drm/msm/msm_gem.c:991:3-9: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> --- drivers/gpu/drm/msm/msm_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)