Skip to content

Commit

Permalink
x86: OLPC: have prom_early_alloc BUG rather than return NULL
Browse files Browse the repository at this point in the history
..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>
  • Loading branch information
Andres Salomon authored and Grant Likely committed Mar 2, 2011
1 parent 8aaccf7 commit 60cba5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/platform/olpc/olpc_dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 60cba5a

Please sign in to comment.