aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/lmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/lmb.c')
-rw-r--r--arch/powerpc/mm/lmb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 9584608fd768..bbe3eac918e8 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -197,6 +197,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size)
197{ 197{
198 struct lmb_region *_rgn = &(lmb.reserved); 198 struct lmb_region *_rgn = &(lmb.reserved);
199 199
200 BUG_ON(0 == size);
201
200 return lmb_add_region(_rgn, base, size); 202 return lmb_add_region(_rgn, base, size);
201} 203}
202 204
@@ -227,6 +229,8 @@ unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align,
227 long i, j; 229 long i, j;
228 unsigned long base = 0; 230 unsigned long base = 0;
229 231
232 BUG_ON(0 == size);
233
230#ifdef CONFIG_PPC32 234#ifdef CONFIG_PPC32
231 /* On 32-bit, make sure we allocate lowmem */ 235 /* On 32-bit, make sure we allocate lowmem */
232 if (max_addr == LMB_ALLOC_ANYWHERE) 236 if (max_addr == LMB_ALLOC_ANYWHERE)