diff options
author | Milton Miller <miltonm@bga.com> | 2011-05-10 15:29:24 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 01:30:57 -0400 |
commit | a56555e573d3740d588d912aada506d57759cf5d (patch) | |
tree | 1f1c44ec8f60cc68f6fd79e3c6c54db2aee02c4c /arch/powerpc/lib | |
parent | 7ca8aa0924712de81485c70e00bbea8c092a08c1 (diff) |
powerpc: Remove alloc_maybe_bootmem for zalloc version
Replace all remaining callers of alloc_maybe_bootmem with
zalloc_maybe_bootmem. The callsite in pci_dn is followed with a
memset to clear the memory, and not zeroing at the other callsites
in the celleb fake pci code could lead to following uninitialized
memory as pointers or even freeing said pointers on error paths.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r-- | arch/powerpc/lib/alloc.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/powerpc/lib/alloc.c b/arch/powerpc/lib/alloc.c index f53e09c7dac7..13b676c20d12 100644 --- a/arch/powerpc/lib/alloc.c +++ b/arch/powerpc/lib/alloc.c | |||
@@ -6,14 +6,6 @@ | |||
6 | 6 | ||
7 | #include <asm/system.h> | 7 | #include <asm/system.h> |
8 | 8 | ||
9 | void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) | ||
10 | { | ||
11 | if (mem_init_done) | ||
12 | return kmalloc(size, mask); | ||
13 | else | ||
14 | return alloc_bootmem(size); | ||
15 | } | ||
16 | |||
17 | void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) | 9 | void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) |
18 | { | 10 | { |
19 | void *p; | 11 | void *p; |