Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675308 > unrolled thread

[PATCH] drm/i915: Fix an error checking test

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-06-27 07:50 +0200
Last post2017-06-27 15:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/i915: Fix an error checking test Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-06-27 07:50 +0200
    Re: [PATCH] drm/i915: Fix an error checking test Chris Wilson <chris@chris-wilson.co.uk> - 2017-06-27 15:40 +0200

#1675308 — [PATCH] drm/i915: Fix an error checking test

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-06-27 07:50 +0200
Subject[PATCH] drm/i915: Fix an error checking test
Message-ID<tWRxT-4vM-7@gated-at.bofh.it>
'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>
---
 drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 6 +++---
 1 file 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;
 	}
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1675708

FromChris Wilson <chris@chris-wilson.co.uk>
Date2017-06-27 15:40 +0200
Message-ID<tWYSL-18m-31@gated-at.bofh.it>
In reply to#1675308
Quoting Christophe JAILLET (2017-06-27 06:38:54)
> '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>

Thanks for the fix, reviewed and pushed.
-Chris

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web