diff options
author | Jesper Juhl <jj@chaosbits.net> | 2010-10-30 21:56:26 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-31 09:47:26 +0100 |
commit | 559fa6e76b271b98ff641fa2a968aa2439e43c28 (patch) | |
tree | 67c1c812b76587998ba423df55d8fb3cf9a69961 /kernel/profile.c | |
parent | 3985c7ce85039adacdf882904ca096f091d39346 (diff) |
profile: Use vzalloc() rather than vmalloc() & memset()
There's no reason to memset() manually when we have vzalloc().
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: William Irwin <wli@holomorphy.com>
LKML-Reference: <alpine.LNX.2.00.1010302150310.1572@swampdragon.chaosbits.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/profile.c')
-rw-r--r-- | kernel/profile.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index 66f841b7fbd3..14c9f87b9fc9 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -126,11 +126,9 @@ int __ref profile_init(void) if (prof_buffer) return 0; - prof_buffer = vmalloc(buffer_bytes); - if (prof_buffer) { - memset(prof_buffer, 0, buffer_bytes); + prof_buffer = vzalloc(buffer_bytes); + if (prof_buffer) return 0; - } free_cpumask_var(prof_cpu_mask); return -ENOMEM; |