Add return value to reserve_bootmem_node()
This patch changes the function reserve_bootmem_node() from void to int, returning -ENOMEM if the allocation fails. This fixes a build problem on x86 with CONFIG_KEXEC=y and CONFIG_NEED_MULTIPLE_NODES=y Signed-off-by: Bernhard Walle <bwalle@suse.de> Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
a19214430d
commit
71c2742f5e
@@ -442,15 +442,17 @@ unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn,
|
||||
return init_bootmem_core(pgdat, freepfn, startpfn, endpfn);
|
||||
}
|
||||
|
||||
void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
|
||||
int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
|
||||
unsigned long size, int flags)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
|
||||
if (ret < 0)
|
||||
return;
|
||||
return -ENOMEM;
|
||||
reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
|
||||
|
Reference in New Issue
Block a user