diff mbox

[1/6] drm/i915: remove IS_ERR_OR_NULL check

Message ID 1460107954-13740-1-git-send-email-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matthew Auld April 8, 2016, 9:32 a.m. UTC
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(-)

Comments

Chris Wilson April 8, 2016, 10:31 a.m. UTC | #1
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 mbox

Patch

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);