Commit 665c1c21 authored by Matthew Auld's avatar Matthew Auld Committed by Chris Wilson

drm/i915/buddy: tidy up i915_buddy_fini

If we are leaking nodes don't hide it. Also stop trying to be
"defensive" and instead embrace Kasan et al.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190816105357.14340-1-matthew.auld@intel.com
parent 6ac689d2
...@@ -171,15 +171,10 @@ int i915_buddy_init(struct i915_buddy_mm *mm, u64 size, u64 chunk_size) ...@@ -171,15 +171,10 @@ int i915_buddy_init(struct i915_buddy_mm *mm, u64 size, u64 chunk_size)
void i915_buddy_fini(struct i915_buddy_mm *mm) void i915_buddy_fini(struct i915_buddy_mm *mm)
{ {
int err = 0;
int i; int i;
for (i = 0; i < mm->n_roots; ++i) { for (i = 0; i < mm->n_roots; ++i) {
if (!i915_buddy_block_is_free(mm->roots[i])) { GEM_WARN_ON(!i915_buddy_block_is_free(mm->roots[i]));
err = -EBUSY;
continue;
}
i915_block_free(mm->roots[i]); i915_block_free(mm->roots[i]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment