summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c')
-rw-r--r--sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c b/sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
index ca75acbd847..958d465c84d 100644
--- a/sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
+++ b/sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
@@ -346,8 +346,10 @@ static int live_parallel_switch(void *arg)
continue;
ce = intel_context_create(data[m].ce[0]->engine);
- if (IS_ERR(ce))
+ if (IS_ERR(ce)) {
+ err = PTR_ERR(ce);
goto out;
+ }
err = intel_context_pin(ce);
if (err) {
@@ -367,8 +369,10 @@ static int live_parallel_switch(void *arg)
worker = kthread_create_worker(0, "igt/parallel:%s",
data[n].ce[0]->engine->name);
- if (IS_ERR(worker))
+ if (IS_ERR(worker)) {
+ err = PTR_ERR(worker);
goto out;
+ }
data[n].worker = worker;
}
@@ -397,8 +401,10 @@ static int live_parallel_switch(void *arg)
}
}
- if (igt_live_test_end(&t))
- err = -EIO;
+ if (igt_live_test_end(&t)) {
+ err = err ?: -EIO;
+ break;
+ }
}
out: