From 665c1c2166d3cc394f0cf2dd2da1e68b645552a7 Mon Sep 17 00:00:00 2001 From: Matthew Auld Date: Fri, 16 Aug 2019 11:53:56 +0100 Subject: [PATCH] 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 Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190816105357.14340-1-matthew.auld@intel.com --- drivers/gpu/drm/i915/i915_buddy.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_buddy.c b/drivers/gpu/drm/i915/i915_buddy.c index b679ab6fd889..5995247fdf76 100644 --- a/drivers/gpu/drm/i915/i915_buddy.c +++ b/drivers/gpu/drm/i915/i915_buddy.c @@ -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]); }