summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2008-06-21 17:01:02 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-21 18:25:10 (GMT)
commit71c2742f5e6348d76ee62085cf0a13e5eff0f00e (patch)
tree44020f575319903e3ef18665baec360b6ea1c98d /mm
parenta19214430d27a3af6f1672ec26f3c893ef899ede (diff)
downloadlinux-71c2742f5e6348d76ee62085cf0a13e5eff0f00e.tar.xz
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index e8fb927..8d9f60e 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,
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,