On Wed, Nov 11, 2015 at 04:06:10PM +0530, ankitprasad.r.sharma@xxxxxxxxx wrote: > @@ -4399,14 +4399,15 @@ struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev, > struct drm_i915_gem_object *obj; > struct address_space *mapping; > gfp_t mask; > + int ret = 0; No need for this initialisation. > > obj = i915_gem_object_alloc(dev); > if (obj == NULL) > - return NULL; > + return ERR_PTR(-ENOMEM); > > - if (drm_gem_object_init(dev, &obj->base, size) != 0) { > + if ((ret = drm_gem_object_init(dev, &obj->base, size)) != 0) { It is considered bad form to do assignments inside the predicate. ret = drm_gem_object_init(dev, &obj->base, size); if (ret) { > i915_gem_object_free(obj); > - return NULL; > + return ERR_PTR(ret); > } That's the only nit I found. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx