Commit f4b1b92f authored by Matthew Auld's avatar Matthew Auld Committed by Chris Wilson
Browse files

drm/i915/buddy: avoid double list_add



Be careful not to mark an already free node as free again.

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/20200305204711.217783-1-matthew.auld@intel.com
parent 520f8350
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ i915_buddy_alloc(struct i915_buddy_mm *mm, unsigned int order)
	return block;

out_free:
	if (i != order)
		__i915_buddy_free(mm, block);
	return ERR_PTR(err);
}