diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-06-21 13:01:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-21 14:25:10 -0400 |
commit | 71c2742f5e6348d76ee62085cf0a13e5eff0f00e (patch) | |
tree | 44020f575319903e3ef18665baec360b6ea1c98d /mm | |
parent | a19214430d27a3af6f1672ec26f3c893ef899ede (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/bootmem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index e8fb927392b9..8d9f60e06f62 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -442,15 +442,17 @@ unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn, | |||
442 | return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); | 442 | return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); |
443 | } | 443 | } |
444 | 444 | ||
445 | void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | 445 | int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, |
446 | unsigned long size, int flags) | 446 | unsigned long size, int flags) |
447 | { | 447 | { |
448 | int ret; | 448 | int ret; |
449 | 449 | ||
450 | ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); | 450 | ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); |
451 | if (ret < 0) | 451 | if (ret < 0) |
452 | return; | 452 | return -ENOMEM; |
453 | reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); | 453 | reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); |
454 | |||
455 | return 0; | ||
454 | } | 456 | } |
455 | 457 | ||
456 | void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | 458 | void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, |