On Fri, Sep 18, 2020 at 01:12:08PM +0200, Maarten Lankhorst wrote: > In case backoff fails with an error, we return an undefined rq, > assign err to rq correctly. > > Fixes: 8a929c9eb1c2 ("drm/i915: Use ww pinning for intel_context_create_request()") > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/intel_context.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c > index d301dda1b261..92a3f25c4006 100644 > --- a/drivers/gpu/drm/i915/gt/intel_context.c > +++ b/drivers/gpu/drm/i915/gt/intel_context.c > @@ -472,6 +472,7 @@ struct i915_request *intel_context_create_request(struct intel_context *ce) > err = i915_gem_ww_ctx_backoff(&ww); > if (!err) > goto retry; > + rq = ERR_PTR(err); The mix with "err" and rq handling both request and err is a bit confusing ihmo and prone to misses like this. I wonder if we also need this before the goto retry as well... but anyway it looks better than before with no rq assigment on this block... Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > } else { > rq = ERR_PTR(err); > } > > base-commit: 5887fa2d8b9b7f6a278f9a1bc8642cb9d5d0279a > -- > 2.28.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx