Skip to content

Commit 79d0150

Browse files
tursulinjlahtine-intel
authored andcommitted
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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> Cc: Andi Shyti <[email protected]> Reviewed-by: Andi Shyti <[email protected]> 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/[email protected] (cherry picked from commit 412fa1f) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 2d6f2f7 commit 79d0150

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

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

348348
ce = intel_context_create(data[m].ce[0]->engine);
349-
if (IS_ERR(ce))
349+
if (IS_ERR(ce)) {
350+
err = PTR_ERR(ce);
350351
goto out;
352+
}
351353

352354
err = intel_context_pin(ce);
353355
if (err) {
@@ -367,8 +369,10 @@ static int live_parallel_switch(void *arg)
367369

368370
worker = kthread_create_worker(0, "igt/parallel:%s",
369371
data[n].ce[0]->engine->name);
370-
if (IS_ERR(worker))
372+
if (IS_ERR(worker)) {
373+
err = PTR_ERR(worker);
371374
goto out;
375+
}
372376

373377
data[n].worker = worker;
374378
}
@@ -397,8 +401,10 @@ static int live_parallel_switch(void *arg)
397401
}
398402
}
399403

400-
if (igt_live_test_end(&t))
401-
err = -EIO;
404+
if (igt_live_test_end(&t)) {
405+
err = err ?: -EIO;
406+
break;
407+
}
402408
}
403409

404410
out:

0 commit comments

Comments
 (0)