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: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190816105357.14340-1-matthew.auld@intel.com
This commit is contained in:
Matthew Auld 2019-08-16 11:53:56 +01:00 committed by Chris Wilson
parent 6ac689d2e3
commit 665c1c2166

View File

@ -171,15 +171,10 @@ out_free_list:
void i915_buddy_fini(struct i915_buddy_mm *mm)
{
int err = 0;
int i;
for (i = 0; i < mm->n_roots; ++i) {
if (!i915_buddy_block_is_free(mm->roots[i])) {
err = -EBUSY;
continue;
}
GEM_WARN_ON(!i915_buddy_block_is_free(mm->roots[i]));
i915_block_free(mm->roots[i]);
}