diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-06-27 07:38:54 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-27 14:30:56 +0100 |
commit | 7c3f5317b8c2828ab10e8cf87c8ab5232d1966d0 (patch) | |
tree | f2c8ca25ff3de0240abc6cf29104ef024ffd7a28 /drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | |
parent | 774eed4a408185d7a2cde16f40b1806d4fb1d531 (diff) | |
download | linux-7c3f5317b8c2828ab10e8cf87c8ab5232d1966d0.tar.bz2 |
drm/i915: Fix an error checking test
'dma_buf_vmap' returns NULL on error, not an error pointer.
Fixes: 6cca22ede8a4 ("drm/i915: Add some mock tests for dmabuf interop")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627053854.21152-1-christophe.jaillet@wanadoo.fr
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c index d15cc9d3a5cd..89dc25a5a53b 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c @@ -246,9 +246,9 @@ static int igt_dmabuf_export_vmap(void *arg) i915_gem_object_put(obj); ptr = dma_buf_vmap(dmabuf); - if (IS_ERR(ptr)) { - err = PTR_ERR(ptr); - pr_err("dma_buf_vmap failed with err=%d\n", err); + if (!ptr) { + pr_err("dma_buf_vmap failed\n"); + err = -ENOMEM; goto out; } |