aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-19 01:45:46 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-19 02:58:33 -0400
commitdb473b36d4a2eb02c65aefca11578698b3699fe0 (patch)
tree6644aa6d0b6a4a3fcb01a1cb2591010ad1afe254 /drivers/gpu/drm/i915/i915_gem.c
parentbf8fa3d383aa9eb0003419e40ad0f3667c810154 (diff)
drm/i915: checking for NULL instead of IS_ERR()
i915_gem_vma_create() returns and ERR_PTR() or a valid pointer, it never returns NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index bd8c0086d0c1..56642d8eb937 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3134,9 +3134,9 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
3134 i915_gem_object_pin_pages(obj); 3134 i915_gem_object_pin_pages(obj);
3135 3135
3136 vma = i915_gem_vma_create(obj, &dev_priv->gtt.base); 3136 vma = i915_gem_vma_create(obj, &dev_priv->gtt.base);
3137 if (vma == NULL) { 3137 if (IS_ERR(vma)) {
3138 i915_gem_object_unpin_pages(obj); 3138 i915_gem_object_unpin_pages(obj);
3139 return -ENOMEM; 3139 return PTR_ERR(vma);
3140 } 3140 }
3141 3141
3142search_free: 3142search_free: