Skip to content

Commit

Permalink
x86/platform/uv: Replace kmalloc() & memset with kzalloc()
Browse files Browse the repository at this point in the history
This was found using coccicheck.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Link: http://lkml.kernel.org/r/1362822043-15559-1-git-send-email-gheorghiuandru@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Alexandru Gheorghiu authored and Ingo Molnar committed Mar 11, 2013
1 parent f6161aa commit e87b686
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/platform/uv/uv_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e87b686

Please sign in to comment.