From: Jesper Juhl Date: Sat, 30 Oct 2010 19:56:26 +0000 (+0200) Subject: profile: Use vzalloc() rather than vmalloc() & memset() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=559fa6e76b271b98ff641fa2a968aa2439e43c28;p=linux-beck.git profile: Use vzalloc() rather than vmalloc() & memset() There's no reason to memset() manually when we have vzalloc(). Signed-off-by: Jesper Juhl Cc: Arjan van de Ven Cc: William Irwin LKML-Reference: Signed-off-by: Ingo Molnar --- 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;