Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a13a2ec authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jani Nikula
Browse files

drm/i915: Fix an error checking test



'dma_buf_vmap' returns NULL on error, not an error pointer.

Fixes: 6cca22ed ("drm/i915: Add some mock tests for dmabuf interop")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: http://patchwork.freedesktop.org/patch/msgid/20170627053854.21152-1-christophe.jaillet@wanadoo.fr


Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 7c3f5317)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ce3f7163
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -246,9 +246,9 @@ static int igt_dmabuf_export_vmap(void *arg)
	i915_gem_object_put(obj);
	i915_gem_object_put(obj);


	ptr = dma_buf_vmap(dmabuf);
	ptr = dma_buf_vmap(dmabuf);
	if (IS_ERR(ptr)) {
	if (!ptr) {
		err = PTR_ERR(ptr);
		pr_err("dma_buf_vmap failed\n");
		pr_err("dma_buf_vmap failed with err=%d\n", err);
		err = -ENOMEM;
		goto out;
		goto out;
	}
	}