[Intel-gfx] [PATCH 4/6] drm/i915/selftests: Add a simple rollover for the kernel context

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 3 17:37:11 UTC 2020


Quoting Matthew Auld (2020-02-03 17:32:29)
> On 03/02/2020 09:41, Chris Wilson wrote:
> > +             for (i = 0; i < ARRAY_SIZE(rq); i++) {
> > +                     rq[i] = i915_request_create(ce);
> > +                     if (IS_ERR(rq[i])) {
> > +                             err = PTR_ERR(rq[i]);
> > +                             goto out;
> > +                     }
> > +
...
> > +out:
> > +             for (i = 0; i < ARRAY_SIZE(rq); i++)
> > +                     i915_request_put(rq[i]);
> 
> !IS_ERR_OR_NULL()?

Oh drat, I let err into rq[]. I'll rework the assignment to avoid
putting the ERR_PTR here.
-Chris


More information about the Intel-gfx mailing list