From: Andres Salomon Date: Fri, 25 Feb 2011 04:06:31 +0000 (-0800) Subject: x86: OLPC: have prom_early_alloc BUG rather than return NULL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60cba5a57b8affe98ea9f2bac147be0fb253d5f4;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git x86: OLPC: have prom_early_alloc BUG rather than return NULL ..similar to what sparc's prom_early_alloc does. Signed-off-by: Andres Salomon Signed-off-by: Grant Likely --- diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c index dab874647530..044bda5b3174 100644 --- a/arch/x86/platform/olpc/olpc_dt.c +++ b/arch/x86/platform/olpc/olpc_dt.c @@ -140,8 +140,7 @@ void * __init prom_early_alloc(unsigned long size) * wasted bootmem) and hand off chunks of it to callers. */ res = alloc_bootmem(chunk_size); - if (!res) - return NULL; + BUG_ON(!res); prom_early_allocated += chunk_size; memset(res, 0, chunk_size); free_mem = chunk_size;