提交 35a9611c 编写于 作者: C Chris Wilson

drm/i915: Initialize return value for empty i915_gem_object_unbind()

If the obj->vma_list is empty, we immediately return ret. However, we
are doing so having never set it to any value, it should be zero!
Reported-by: NMatthew Auld <matthew.auld@intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=97343
Fixes: aa653a68 ("drm/i915: Be more careful when unbinding vma")
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471196681-30043-1-git-send-email-chris@chris-wilson.co.ukReviewed-by: NMatthew Auld <matthew.auld@intel.com>
上级 0b1de5d5
...@@ -279,12 +279,11 @@ static const struct drm_i915_gem_object_ops i915_gem_phys_ops = { ...@@ -279,12 +279,11 @@ static const struct drm_i915_gem_object_ops i915_gem_phys_ops = {
.release = i915_gem_object_release_phys, .release = i915_gem_object_release_phys,
}; };
int int i915_gem_object_unbind(struct drm_i915_gem_object *obj)
i915_gem_object_unbind(struct drm_i915_gem_object *obj)
{ {
struct i915_vma *vma; struct i915_vma *vma;
LIST_HEAD(still_in_list); LIST_HEAD(still_in_list);
int ret; int ret = 0;
/* The vma will only be freed if it is marked as closed, and if we wait /* The vma will only be freed if it is marked as closed, and if we wait
* upon rendering to the vma, we may unbind anything in the list. * upon rendering to the vma, we may unbind anything in the list.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册