Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx> writes: > If intel context create failed, the perf_series_engines() will return 0 > rather than error, because we doesn't initialize the return value. > > Fixes: cbfd3a0c5a55 ("drm/i915/selftests: Add request throughput measurement to perf") > Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> > Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx> Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c > index 6b512fc13ca7..e424a6d1a68c 100644 > --- a/drivers/gpu/drm/i915/selftests/i915_request.c > +++ b/drivers/gpu/drm/i915/selftests/i915_request.c > @@ -2469,8 +2469,10 @@ static int perf_series_engines(void *arg) > struct intel_context *ce; > > ce = intel_context_create(engine); > - if (IS_ERR(ce)) > + if (IS_ERR(ce)) { > + err = PTR_ERR(ce); > goto out; > + } > > err = intel_context_pin(ce); > if (err) { > -- > 2.25.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel