drm/i915/selftest: Fix an error code in live_noa_gpr()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Jul 2020 14:36:52 +0000 (17:36 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Jul 2020 17:16:15 +0000 (18:16 +0100)
The error code needs to be set on this path.  It currently returns
success.

Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200714143652.GA337376@mwanda
drivers/gpu/drm/i915/selftests/i915_perf.c

index 0aa1515..c2d001d 100644 (file)
@@ -357,6 +357,7 @@ static int live_noa_gpr(void *arg)
 
                cs = intel_ring_begin(rq, 4);
                if (IS_ERR(cs)) {
+                       err = PTR_ERR(cs);
                        i915_request_add(rq);
                        goto out_rq;
                }