mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-07 06:14:24 +08:00
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:
parent
6ac689d2e3
commit
665c1c2166
@ -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]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user