From 1f6ddcd0dff4d7b937556045325b82657296e9ca Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 20 Jun 2023 02:28:16 +0000 Subject: [PATCH] drm/i915/selftests: Add some missing error propagation From Tvrtko Ursulin 76eef453a675794e98400c8889446b1503a9dfa6 in linux-6.1.y/6.1.34 79d0150d2d983a4f6efee676cea06027f586fcd0 in mainline linux --- .../pci/drm/i915/gem/selftests/i915_gem_context.c | 14 ++++++++++---- 1 file 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: -- 2.20.1