aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
diff options
context:
space:
mode:
authorCQ Tang <cq.tang@intel.com>2019-10-04 18:04:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-10-04 19:27:41 +0100
commit0e5493cab5ef90fb91f89a2dc84259c7a7d7fd50 (patch)
tree45a5f3cf79aafaf4762553d7d1ff2c10919c4cdd /drivers/gpu/drm/i915/gt/intel_ringbuffer.c
parentdrm/i915: Implement a better i945gm vblank irq vs. C-states workaround (diff)
downloadlinux-dev-0e5493cab5ef90fb91f89a2dc84259c7a7d7fd50.tar.xz
linux-dev-0e5493cab5ef90fb91f89a2dc84259c7a7d7fd50.zip
drm/i915/stolen: make the object creation interface consistent
Our other backends return an actual error value upon failure. Do the same for stolen objects, which currently just return NULL on failure. Signed-off-by: CQ Tang <cq.tang@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191004170452.15410-2-matthew.auld@intel.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_ringbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
index ec32996254c0..311fdc0a21bc 100644
--- a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
@@ -1274,7 +1274,7 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
struct i915_vma *vma;
obj = i915_gem_object_create_stolen(i915, size);
- if (!obj)
+ if (IS_ERR(obj))
obj = i915_gem_object_create_internal(i915, size);
if (IS_ERR(obj))
return ERR_CAST(obj);