mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
drm/i915/selftests: Fix wrong return value of perf_request_latency()
If intel context create failed, the perf_request_latency() will return 0
rather than error, because we doesn't initialize the return value.
Fixes: 25c26f18ea
("drm/i915/selftests: Measure dispatch latency")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20201116143540.3648870-1-zhangxiaoxu5@huawei.com
This commit is contained in:
parent
01d708840c
commit
1938445205
@ -2293,8 +2293,10 @@ static int perf_request_latency(void *arg)
|
|||||||
struct intel_context *ce;
|
struct intel_context *ce;
|
||||||
|
|
||||||
ce = intel_context_create(engine);
|
ce = intel_context_create(engine);
|
||||||
if (IS_ERR(ce))
|
if (IS_ERR(ce)) {
|
||||||
|
err = PTR_ERR(ce);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
err = intel_context_pin(ce);
|
err = intel_context_pin(ce);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user