Skip to content

Commit 412fa1f

Browse files
committed
drm/i915/selftests: Add some missing error propagation
Add some missing error propagation in live_parallel_switch. To avoid needlessly burdening the various backport processes, note I am not marking it as a fix against any patches and not copying stable since it is debug/selftests only code. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Fixes: 50d16d4 ("drm/i915/selftests: Exercise context switching in parallel") Fixes: 6407cf5 ("drm/i915/selftests: Stop using kthread_stop()") Link: https://patchwork.freedesktop.org/patch/msgid/20230605131135.396854-1-tvrtko.ursulin@linux.intel.com
1 parent e894b72 commit 412fa1f

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,10 @@ static int live_parallel_switch(void *arg)
348348
continue;
349349

350350
ce = intel_context_create(data[m].ce[0]->engine);
351-
if (IS_ERR(ce))
351+
if (IS_ERR(ce)) {
352+
err = PTR_ERR(ce);
352353
goto out;
354+
}
353355

354356
err = intel_context_pin(ce);
355357
if (err) {
@@ -369,8 +371,10 @@ static int live_parallel_switch(void *arg)
369371

370372
worker = kthread_create_worker(0, "igt/parallel:%s",
371373
data[n].ce[0]->engine->name);
372-
if (IS_ERR(worker))
374+
if (IS_ERR(worker)) {
375+
err = PTR_ERR(worker);
373376
goto out;
377+
}
374378

375379
data[n].worker = worker;
376380
}
@@ -399,8 +403,10 @@ static int live_parallel_switch(void *arg)
399403
}
400404
}
401405

402-
if (igt_live_test_end(&t))
403-
err = -EIO;
406+
if (igt_live_test_end(&t)) {
407+
err = err ?: -EIO;
408+
break;
409+
}
404410
}
405411

406412
out:

0 commit comments

Comments
 (0)