drm/i915/selftests: Add some missing error propagation
authorjsg <jsg@openbsd.org>
Tue, 20 Jun 2023 02:28:16 +0000 (02:28 +0000)
committerjsg <jsg@openbsd.org>
Tue, 20 Jun 2023 02:28:16 +0000 (02:28 +0000)
From Tvrtko Ursulin
76eef453a675794e98400c8889446b1503a9dfa6 in linux-6.1.y/6.1.34
79d0150d2d983a4f6efee676cea06027f586fcd0 in mainline linux

sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c

index ca75acb..958d465 100644 (file)
@@ -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: