All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] drm/i915/selftests: Fix inconsistent IS_ERR and PTR_ERR
@ 2020-06-16 14:54 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2020-06-16 14:54 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
	Daniel Vetter, Tvrtko Ursulin, Chris Wilson
  Cc: intel-gfx, linux-kernel, dri-devel, Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in live_timeslice_nopreempt().

The proper pointer to be passed as argument to PTR_ERR() is ce.

This bug was detected with the help of Coccinelle.

Fixes: b72f02d78e4f ("drm/i915/gt: Prevent timeslicing into unpreemptable requests")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 91543494f595..393339de0910 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -1337,7 +1337,7 @@ static int live_timeslice_nopreempt(void *arg)
 
 		ce = intel_context_create(engine);
 		if (IS_ERR(ce)) {
-			err = PTR_ERR(rq);
+			err = PTR_ERR(ce);
 			goto out_spin;
 		}
 
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-06-16 23:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-16 14:54 [PATCH][next] drm/i915/selftests: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2020-06-16 14:54 ` Gustavo A. R. Silva
2020-06-16 14:54 ` [Intel-gfx] " Gustavo A. R. Silva
2020-06-16 14:53 ` Chris Wilson
2020-06-16 14:53   ` Chris Wilson
2020-06-16 14:53   ` [Intel-gfx] " Chris Wilson
2020-06-16 20:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR (rev2) Patchwork
2020-06-16 23:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.