aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Auld <[email protected]>2019-08-16 11:53:56 +0100
committerChris Wilson <[email protected]>2019-08-16 16:28:41 +0100
commit665c1c2166d3cc394f0cf2dd2da1e68b645552a7 (patch)
tree531fe652b9b26cff16310728407aaa183d0771fd
parent6ac689d2e3162f2673136b59ea29e18c4cb3fbf1 (diff)
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 <[email protected]> Cc: Chris Wilson <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/i915_buddy.c7
1 files changed, 1 insertions, 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]);
}