* [PATCH] drm/i915: Fix an error checking test
@ 2017-06-27 5:38 Christophe JAILLET
2017-06-27 13:30 ` Chris Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2017-06-27 5:38 UTC (permalink / raw)
To: daniel.vetter, jani.nikula, airlied, chris, joonas.lahtinen,
matthew.auld
Cc: intel-gfx, dri-devel, linux-kernel, kernel-janitors, Christophe JAILLET
'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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Fix an error checking test
2017-06-27 5:38 [PATCH] drm/i915: Fix an error checking test Christophe JAILLET
@ 2017-06-27 13:30 ` Chris Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2017-06-27 13:30 UTC (permalink / raw)
To: Christophe JAILLET, daniel.vetter, jani.nikula, airlied,
joonas.lahtinen, matthew.auld
Cc: intel-gfx, dri-devel, linux-kernel, kernel-janitors, Christophe JAILLET
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-27 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 5:38 [PATCH] drm/i915: Fix an error checking test Christophe JAILLET
2017-06-27 13:30 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).