提交 d2921096 编写于 作者: C Colin Ian King 提交者: Chris Wilson

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: ed2690a9 ("drm/i915/selftest: Check that GPR are restored across noa_wait")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200713142551.423649-1-colin.king@canonical.com
上级 4fe6abb8
...@@ -328,6 +328,7 @@ static int live_noa_gpr(void *arg) ...@@ -328,6 +328,7 @@ static int live_noa_gpr(void *arg)
/* Fill the 16 qword [32 dword] GPR with a known unlikely value */ /* Fill the 16 qword [32 dword] GPR with a known unlikely value */
cs = intel_ring_begin(rq, 2 * 32 + 2); cs = intel_ring_begin(rq, 2 * 32 + 2);
if (IS_ERR(cs)) { if (IS_ERR(cs)) {
err = PTR_ERR(cs);
i915_request_add(rq); i915_request_add(rq);
goto out_rq; goto out_rq;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册