mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
drm/buddy: Modify duplicate list_splice_tail call
Remove the duplicate list_splice_tail call when the total_allocated < size condition is true. Cc: <stable@vger.kernel.org> # 6.7+ Fixes: 8746c6c9dfa3 ("drm/buddy: Fix alloc_range() error handling code") Reported-by: Bert Karwatzki <spasswolf@web.de> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240216100048.4101-1-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
a64056bb5a
commit
02f76a9cd4
@ -538,13 +538,13 @@ static int __alloc_range(struct drm_buddy *mm,
|
|||||||
list_add(&block->left->tmp_link, dfs);
|
list_add(&block->left->tmp_link, dfs);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
list_splice_tail(&allocated, blocks);
|
|
||||||
|
|
||||||
if (total_allocated < size) {
|
if (total_allocated < size) {
|
||||||
err = -ENOSPC;
|
err = -ENOSPC;
|
||||||
goto err_free;
|
goto err_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list_splice_tail(&allocated, blocks);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_undo:
|
err_undo:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user