From: Alexandru Gheorghiu Date: Sat, 9 Mar 2013 09:40:43 +0000 (+0200) Subject: x86/platform/uv: Replace kmalloc() & memset with kzalloc() X-Git-Tag: firefly_0821_release~3680^2~645^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e87b686b5109e171438a0529828d3109b7ad6da3;p=firefly-linux-kernel-4.4.55.git x86/platform/uv: Replace kmalloc() & memset with kzalloc() This was found using coccicheck. Signed-off-by: Alexandru Gheorghiu Link: http://lkml.kernel.org/r/1362822043-15559-1-git-send-email-gheorghiuandru@gmail.com Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c index 98718f604eb6..5c86786bbfd2 100644 --- a/arch/x86/platform/uv/uv_time.c +++ b/arch/x86/platform/uv/uv_time.c @@ -159,10 +159,9 @@ static __init int uv_rtc_allocate_timers(void) { int cpu; - blade_info = kmalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL); + blade_info = kzalloc(uv_possible_blades * sizeof(void *), GFP_KERNEL); if (!blade_info) return -ENOMEM; - memset(blade_info, 0, uv_possible_blades * sizeof(void *)); for_each_present_cpu(cpu) { int nid = cpu_to_node(cpu);