This error path should return a negative error code instead of success. Fixes: c92724de6db1 ("drm/i915/selftests: Try to detect rollback during batchbuffer preemption") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- v2: The first version of the patch fixed some other error paths but those have already been fixed. drivers/gpu/drm/i915/gt/selftest_lrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c index 95d41c01d0e0..e11d6bb26e86 100644 --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c @@ -3264,8 +3264,10 @@ static int live_preempt_user(void *arg) rq = create_gpr_client(engine, global, NUM_GPR * i * sizeof(u32)); - if (IS_ERR(rq)) + if (IS_ERR(rq)) { + err = PTR_ERR(rq); goto end_test; + } client[i] = rq; } -- 2.29.2