Skip to content

Commit 2106edb

Browse files
z00467499rodrigovivi
authored andcommitted
drm/i915/selftests: Fix wrong return value of perf_series_engines()
If intel context create failed, the perf_series_engines() will return 0 rather than error, because we doesn't initialize the return value. Fixes: cbfd3a0 ("drm/i915/selftests: Add request throughput measurement to perf") 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/20201116144112.3673011-1-zhangxiaoxu5@huawei.com (cherry picked from commit 01d7088) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 973dd87 commit 2106edb

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
@@ -2467,8 +2467,10 @@ static int perf_series_engines(void *arg)
24672467
struct intel_context *ce;
24682468

24692469
ce = intel_context_create(engine);
2470-
if (IS_ERR(ce))
2470+
if (IS_ERR(ce)) {
2471+
err = PTR_ERR(ce);
24712472
goto out;
2473+
}
24722474

24732475
err = intel_context_pin(ce);
24742476
if (err) {

0 commit comments

Comments
 (0)