mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
[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: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
ae92dc9f7b
commit
58e9ff5638
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
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);
|
GFP_KERNEL);
|
||||||
if (!counter_config)
|
if (!counter_config)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in a new issue