aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/rheap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib/rheap.c')
-rw-r--r--arch/powerpc/lib/rheap.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index b2f6dcc5960..180ee2933ab 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -468,25 +468,19 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch
if (blk->size == size) {
/* Move from free list to taken list */
list_del(&blk->list);
- blk->owner = owner;
- start = blk->start;
-
- attach_taken_block(info, blk);
+ newblk = blk;
+ } else {
+ newblk = get_slot(info);
+ newblk->start = blk->start;
+ newblk->size = size;
- return start;
+ /* blk still in free list, with updated start, size */
+ blk->start += size;
+ blk->size -= size;
}
- newblk = get_slot(info);
- newblk->start = blk->start;
- newblk->size = size;
newblk->owner = owner;
-
- /* blk still in free list, with updated start, size */
- blk->start += size;
- blk->size -= size;
-
start = newblk->start;
-
attach_taken_block(info, newblk);
/* for larger alignment return fixed up pointer */