Skip to content

Commit b5462cc

Browse files
z00467499rodrigovivi
authored andcommitted
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: 25c26f1 ("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 (cherry picked from commit 1938445) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 2106edb commit b5462cc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2293,8 +2293,10 @@ static int perf_request_latency(void *arg)
22932293
struct intel_context *ce;
22942294

22952295
ce = intel_context_create(engine);
2296-
if (IS_ERR(ce))
2296+
if (IS_ERR(ce)) {
2297+
err = PTR_ERR(ce);
22972298
goto out;
2299+
}
22982300

22992301
err = intel_context_pin(ce);
23002302
if (err) {

0 commit comments

Comments
 (0)