From: Tian Tao <tiantao6@hisilicon.com> To: <robdclark@gmail.com>, <sean@poorly.run>, <airlied@linux.ie>, <daniel@ffwll.ch>, <sumit.semwal@linaro.org>, <christian.koenig@amd.com> Cc: <linux-arm-msm@vger.kernel.org>, <dri-devel@lists.freedesktop.org> Subject: [PATCH] drm/msm: fix NULL check before some freeing functions is not needed Date: Tue, 26 Jan 2021 11:46:25 +0800 [thread overview] Message-ID: <1611632785-9462-1-git-send-email-tiantao6@hisilicon.com> (raw) 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(-) 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 -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Tian Tao <tiantao6@hisilicon.com> To: <robdclark@gmail.com>, <sean@poorly.run>, <airlied@linux.ie>, <daniel@ffwll.ch>, <sumit.semwal@linaro.org>, <christian.koenig@amd.com> Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/msm: fix NULL check before some freeing functions is not needed Date: Tue, 26 Jan 2021 11:46:25 +0800 [thread overview] Message-ID: <1611632785-9462-1-git-send-email-tiantao6@hisilicon.com> (raw) 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(-) 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 -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-01-26 5:24 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-26 3:46 Tian Tao [this message] 2021-01-26 3:46 ` [PATCH] drm/msm: fix NULL check before some freeing functions is not needed Tian Tao
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1611632785-9462-1-git-send-email-tiantao6@hisilicon.com \ --to=tiantao6@hisilicon.com \ --cc=airlied@linux.ie \ --cc=christian.koenig@amd.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=robdclark@gmail.com \ --cc=sean@poorly.run \ --cc=sumit.semwal@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.