drm/i915/selftests: Fix inconsistent IS_ERR and PTR_ERR
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 16 Jun 2020 14:54:52 +0000 (09:54 -0500)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 16 Jun 2020 19:56:37 +0000 (20:56 +0100)
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>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200616145452.GA25291@embeddedor
drivers/gpu/drm/i915/gt/selftest_lrc.c

index 91543494f5956b940e2a3cbf47dfa7816fbf9382..393339de0910893e586d3c4cd0d3828edd87985f 100644 (file)
@@ -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;
                }