CC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: Lucas Stach <[email protected]> CC: Russell King <[email protected]> CC: Christian Gmeiner <[email protected]> CC: David Airlie <[email protected]> CC: Daniel Vetter <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions") CC: Denis Efremov <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3650b228f83adda7e5ee532e2b90429c03f7b9ec commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 coccinelle: ifnullfree: add vfree(), kvfree*() functions :::::: branch date: 19 hours ago :::::: commit date: 8 weeks ago Please take the patch only if it's a positive warning. Thanks! etnaviv_gem_prime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c @@ -77,8 +77,7 @@ static void etnaviv_gem_prime_release(st /* 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); } _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
