* [PATCH] drm/etnaviv: remove NULL check which is not needed
@ 2021-06-05 12:18 Bernard Zhao
2021-06-07 6:59 ` Christian Gmeiner
0 siblings, 1 reply; 3+ messages in thread
From: Bernard Zhao @ 2021-06-05 12:18 UTC (permalink / raw)
To: Lucas Stach, Russell King, Christian Gmeiner, David Airlie,
Daniel Vetter, etnaviv, dri-devel, linux-kernel
Cc: Bernard Zhao
NULL check before kvfree functions is not needed.
Signed-off-by: Bernard Zhao <bernard@vivo.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.31.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/etnaviv: remove NULL check which is not needed
2021-06-05 12:18 [PATCH] drm/etnaviv: remove NULL check which is not needed Bernard Zhao
@ 2021-06-07 6:59 ` Christian Gmeiner
0 siblings, 0 replies; 3+ messages in thread
From: Christian Gmeiner @ 2021-06-07 6:59 UTC (permalink / raw)
To: Bernard Zhao
Cc: Lucas Stach, Russell King, David Airlie, Daniel Vetter,
The etnaviv authors, DRI mailing list, LKML
Am Sa., 5. Juni 2021 um 14:18 Uhr schrieb Bernard Zhao <bernard@vivo.com>:
>
> NULL check before kvfree functions is not needed.
>
> Signed-off-by: Bernard Zhao <bernard@vivo.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.31.0
>
Thanks for the patch, but there is an other one queued up in
etnaviv/next that fixes the same issue:
https://git.pengutronix.de/cgit/lst/linux/commit/?h=etnaviv/next&id=7d614ab2f20503ed8766363d41f8607337571adf
--
greets
--
Christian Gmeiner, MSc
https://christian-gmeiner.info/privacypolicy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/etnaviv: remove NULL check which is not needed
@ 2021-06-07 6:59 ` Christian Gmeiner
0 siblings, 0 replies; 3+ messages in thread
From: Christian Gmeiner @ 2021-06-07 6:59 UTC (permalink / raw)
To: Bernard Zhao
Cc: David Airlie, The etnaviv authors, DRI mailing list, LKML, Russell King
Am Sa., 5. Juni 2021 um 14:18 Uhr schrieb Bernard Zhao <bernard@vivo.com>:
>
> NULL check before kvfree functions is not needed.
>
> Signed-off-by: Bernard Zhao <bernard@vivo.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.31.0
>
Thanks for the patch, but there is an other one queued up in
etnaviv/next that fixes the same issue:
https://git.pengutronix.de/cgit/lst/linux/commit/?h=etnaviv/next&id=7d614ab2f20503ed8766363d41f8607337571adf
--
greets
--
Christian Gmeiner, MSc
https://christian-gmeiner.info/privacypolicy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-07 6:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 12:18 [PATCH] drm/etnaviv: remove NULL check which is not needed Bernard Zhao
2021-06-07 6:59 ` Christian Gmeiner
2021-06-07 6:59 ` Christian Gmeiner
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.