[Intel-gfx] [PATCH 35/55] drm/i915: Be more careful when unbinding vma

Chris Wilson chris at chris-wilson.co.uk
Tue Jul 26 08:08:36 UTC 2016


On Tue, Jul 26, 2016 at 10:59:35AM +0300, Joonas Lahtinen wrote:
> On ma, 2016-07-25 at 18:32 +0100, Chris Wilson wrote:
> > -	ret = i915_gem_object_put_pages(obj);
> > +	ret = i915_gem_object_unbind(obj);
> > +	if (ret == 0)
> 
> (!ret)
> 
> Other than that, looks good.

I still think ret == 0 expresses the intent of checking for success much
more clearly than !ret.

I suppose if we used err rather than ret, if (!err) works better.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list