[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210601141945.4131934-1-zhengyongjun3@huawei.com>
Date: Tue, 1 Jun 2021 22:19:45 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <l.stach@...gutronix.de>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
CC: <linux+etnaviv@...linux.org.uk>, <christian.gmeiner@...il.com>,
Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] drm/etnaviv: Remove unneeded if-null-free check
Eliminate the following coccicheck warning:
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING:
NULL check before some freeing functions is not needed.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
index b390dd4d60b7..d741b1d735f7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
@@ -80,8 +80,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj)
/* Don't drop the pages for imported dmabuf, as they are not
* ours, just free the array we allocated:
*/
- if (etnaviv_obj->pages)
- kvfree(etnaviv_obj->pages);
+ kvfree(etnaviv_obj->pages);
drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt);
}
--
2.25.1
Powered by blists - more mailing lists