From 5cbddcc62efe2b2fbbcd041850ae7887f75b7938 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 28 Aug 2013 11:25:00 +0100 Subject: [PATCH] fix --- drivers/gpu/drm/i915/i915_gem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 2ee27d3..ddd284d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2798,14 +2798,13 @@ int i915_vma_unbind(struct i915_vma *vma) drm_mm_remove_node(&vma->node); -destroy: - i915_gem_vma_destroy(vma); - /* Since the unbound list is global, only move to that list if * no more VMAs exist. */ - if (list_empty(&obj->vma_list)) + if (list_is_singular(&obj->vma_list)) list_move_tail(&obj->global_list, &dev_priv->mm.unbound_list); +destroy: + i915_gem_vma_destroy(vma); return 0; } -- 1.7.9.5