Skip to content

Commit d292109

Browse files
Colin Ian Kingickle
authored andcommitted
drm/i915/selftest: fix an error return path where err is not being set
There is an error condition where err is not being set and an uninitialized garbage value in err is being returned. Fix this by assigning err to an appropriate error return value before taking the error exit path. Addresses-Coverity: ("Uninitialized scalar value") Fixes: ed2690a ("drm/i915/selftest: Check that GPR are restored across noa_wait") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4fe6abb commit d292109

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/selftests/i915_perf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ static int live_noa_gpr(void *arg)
328328
/* Fill the 16 qword [32 dword] GPR with a known unlikely value */
329329
cs = intel_ring_begin(rq, 2 * 32 + 2);
330330
if (IS_ERR(cs)) {
331+
err = PTR_ERR(cs);
331332
i915_request_add(rq);
332333
goto out_rq;
333334
}

0 commit comments

Comments
 (0)