diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-01-14 13:49:46 +0300 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2019-01-16 18:29:12 +0300 |
commit | f8261c376e7f8cb9024af5a6c54be540c7f9108e (patch) | |
tree | 9e4181bcea4210cf78bb4120897bc3ccd713a4aa /drivers/gpu/drm/etnaviv/etnaviv_dump.c | |
parent | a20ca6744ba7e683a772bb5f1715e4662342be58 (diff) | |
download | linux-f8261c376e7f8cb9024af5a6c54be540c7f9108e.tar.xz |
drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
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@oracle.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_dump.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |