]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
x86: OLPC: have prom_early_alloc BUG rather than return NULL
authorAndres Salomon <dilinger@queued.net>
Fri, 25 Feb 2011 04:06:31 +0000 (20:06 -0800)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 2 Mar 2011 20:45:18 +0000 (13:45 -0700)
..similar to what sparc's prom_early_alloc does.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
arch/x86/platform/olpc/olpc_dt.c

index dab87464753058b10b7b3094c734126dcc862066..044bda5b3174f19c07a0fe9cb8b1ab1d77ca1b60 100644 (file)
@@ -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;