|
@@ -2610,8 +2610,11 @@ int i915_vma_unbind(struct i915_vma *vma)
|
|
|
if (list_empty(&vma->vma_link))
|
|
|
return 0;
|
|
|
|
|
|
- if (!drm_mm_node_allocated(&vma->node))
|
|
|
- goto destroy;
|
|
|
+ if (!drm_mm_node_allocated(&vma->node)) {
|
|
|
+ i915_gem_vma_destroy(vma);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
|
|
|
if (obj->pin_count)
|
|
|
return -EBUSY;
|
|
@@ -2651,7 +2654,6 @@ 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
|