Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c276603 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras
Browse files

[PATCH] powerpc: Fix bug in bug fix for bug in lmb_alloc()



My patch (d7a5b2ff) to always panic if
lmb_alloc() fails is broken because it checks alloc < 0, but should be
checking alloc == 0.

Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9b15879a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -232,7 +232,7 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,


	alloc = __lmb_alloc_base(size, align, max_addr);
	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",
		panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n",
				size, max_addr);
				size, max_addr);