Skip to content

Commit

Permalink
[PATCH] powerpc: Fix bug in bug fix for bug in lmb_alloc()
Browse files Browse the repository at this point in the history
My patch (d7a5b2f) to always panic if
lmb_alloc() fails is broken because it checks alloc < 0, but should be
checking alloc == 0.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Mar 17, 2006
1 parent 9b15879 commit 2c27660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,

alloc = __lmb_alloc_base(size, align, max_addr);

if (alloc < 0)
if (alloc == 0)
panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n",
size, max_addr);

Expand Down

0 comments on commit 2c27660

Please sign in to comment.