aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-10-30 15:56:26 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-31 04:47:26 -0400
commit559fa6e76b271b98ff641fa2a968aa2439e43c28 (patch)
tree67c1c812b76587998ba423df55d8fb3cf9a69961 /kernel
parent3985c7ce85039adacdf882904ca096f091d39346 (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')
-rw-r--r--kernel/profile.c6
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)
126 if (prof_buffer) 126 if (prof_buffer)
127 return 0; 127 return 0;
128 128
129 prof_buffer = vmalloc(buffer_bytes); 129 prof_buffer = vzalloc(buffer_bytes);
130 if (prof_buffer) { 130 if (prof_buffer)
131 memset(prof_buffer, 0, buffer_bytes);
132 return 0; 131 return 0;
133 }
134 132
135 free_cpumask_var(prof_cpu_mask); 133 free_cpumask_var(prof_cpu_mask);
136 return -ENOMEM; 134 return -ENOMEM;