diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-20 17:52:32 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-22 00:30:02 +0100 |
commit | 58e9ff56382bdce340d50b6ff22c422dc617106c (patch) | |
tree | 5cbe14561fe6be5d5a867ef860daf36f938dbdc0 /arch/arm/oprofile | |
parent | [ARM] Oprofile: dynamically allocate counter_config (diff) | |
download | linux-58e9ff56382bdce340d50b6ff22c422dc617106c.tar.xz linux-58e9ff56382bdce340d50b6ff22c422dc617106c.zip |
[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>
Diffstat (limited to 'arch/arm/oprofile')
-rw-r--r-- | arch/arm/oprofile/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index de72902ad0ca..6f833358cd06 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -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; |