[Intel-gfx] [PATCH 1/6] drm/i915: remove IS_ERR_OR_NULL check
Matthew Auld
matthew.auld at intel.com
Fri Apr 8 09:32:29 UTC 2016
A call to i915_gem_alloc_object can only ever return NULL in the event
of an error.
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.4.11
More information about the Intel-gfx
mailing list