public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR
@ 2018-02-14 21:12 Gustavo A. R. Silva
  2018-02-15  9:13 ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-02-14 21:12 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie
  Cc: intel-gfx, dri-devel, linux-kernel, Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom.
The proper pointer to use is _explode_ instead of _purge_.

This issue was detected with the help of Coccinelle.

Fixes: fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index d806427..89b6ca9 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915,
 
 		explode = fake_dma_object(i915, size);
 		if (IS_ERR(explode)) {
-			err = PTR_ERR(purge);
+			err = PTR_ERR(explode);
 			goto err_purge;
 		}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-15 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 21:12 [PATCH] drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2018-02-15  9:13 ` Jani Nikula
2018-02-15 16:09   ` Gustavo A. R. Silva
2018-02-15 16:34     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox