Skip to content
Snippets Groups Projects
Commit 58e9ff56 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] Use kcalloc to allocate counter_config array rather than kmalloc


We need this to be zero initialised.  Since this is an array, use kcalloc
rather than kzalloc or kmalloc.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ae92dc9f
No related merge requests found
......@@ -140,7 +140,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
if (ret < 0)
return ret;
counter_config = kmalloc(sizeof(struct op_counter_config) * spec->num_counters,
counter_config = kcalloc(spec->num_counters, sizeof(struct op_counter_config),
GFP_KERNEL);
if (!counter_config)
return -ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment