Skip to content

Commit 60cba5a

Browse files
dilingerglikely
authored andcommitted
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>
1 parent 8aaccf7 commit 60cba5a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎arch/x86/platform/olpc/olpc_dt.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ void * __init prom_early_alloc(unsigned long size)
140140
* wasted bootmem) and hand off chunks of it to callers.
141141
*/
142142
res = alloc_bootmem(chunk_size);
143-
if (!res)
144-
return NULL;
143+
BUG_ON(!res);
145144
prom_early_allocated += chunk_size;
146145
memset(res, 0, chunk_size);
147146
free_mem = chunk_size;

0 commit comments

Comments
 (0)