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 <dilinger@queued.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Andres Salomon 2011-02-24 20:06:31 -08:00 committed by Grant Likely
parent 8aaccf7fa2
commit 60cba5a57b

View 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;