[PATCH] drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
Lucas Stach
l.stach at pengutronix.de
Wed Jan 16 15:31:36 UTC 2019
Am Montag, den 14.01.2019, 13:49 +0300 schrieb Dan Carpenter:
> The etnaviv_gem_get_pages() never returns NULL. It returns error
> pointers on error.
>
> Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Thanks, applied to etnaviv/next.
> ---
> drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_dump.c
> b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
> index 3fbb4855396c..33854c94cb85 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_dump.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_dump.c
> @@ -215,7 +215,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)
> mutex_lock(&obj->lock);
> pages = etnaviv_gem_get_pages(obj);
> mutex_unlock(&obj->lock);
> - if (pages) {
> + if (!IS_ERR(pages)) {
> int j;
>
> iter.hdr->data[0] = bomap - bomap_start;
More information about the dri-devel
mailing list