Message ID | 1460107954-13740-1-git-send-email-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Apr 08, 2016 at 10:32:29AM +0100, Matthew Auld wrote: > A call to i915_gem_alloc_object can only ever return NULL in the event > of an error. We are planning to report the real error back. -Chris
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index b342f67..84db11a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5336,7 +5336,7 @@ i915_gem_object_create_from_data(struct drm_device *dev, int ret; obj = i915_gem_alloc_object(dev, round_up(size, PAGE_SIZE)); - if (IS_ERR_OR_NULL(obj)) + if (!obj) return obj; ret = i915_gem_object_set_to_cpu_domain(obj, true);
A call to i915_gem_alloc_object can only ever return NULL in the event of an error. Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> --- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)