From 2c276603c3e5ebf38155a9d1fbbda656d52d138e Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 16 Mar 2006 14:47:20 +1100 Subject: [PATCH] [PATCH] powerpc: Fix bug in bug fix for bug in lmb_alloc() My patch (d7a5b2ffa1352f0310630934a56aecbdfb617b72) 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 Signed-off-by: Paul Mackerras --- arch/powerpc/mm/lmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 874cd103ce6e..417d58518558 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c @@ -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); -- 2.20.1