diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
commit | 9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch) | |
tree | b38979b835b5d22e681b175d0b98a3c7560d9c59 /arch/powerpc/mm/lmb.c | |
parent | 51e9f2ff83df6b1c81c5c44f4486c68ed87aa20e (diff) | |
parent | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'arch/powerpc/mm/lmb.c')
-rw-r--r-- | arch/powerpc/mm/lmb.c | 4 |
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) |