aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/oprofile
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-20 11:52:32 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-21 18:30:02 -0500
commit58e9ff56382bdce340d50b6ff22c422dc617106c (patch)
tree5cbe14561fe6be5d5a867ef860daf36f938dbdc0 /arch/arm/oprofile
parentae92dc9f7bc9018f1d043f102747a1f1e4dd96fb (diff)
[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.c2
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)
140 if (ret < 0) 140 if (ret < 0)
141 return ret; 141 return ret;
142 142
143 counter_config = kmalloc(sizeof(struct op_counter_config) * spec->num_counters, 143 counter_config = kcalloc(spec->num_counters, sizeof(struct op_counter_config),
144 GFP_KERNEL); 144 GFP_KERNEL);
145 if (!counter_config) 145 if (!counter_config)
146 return -ENOMEM; 146 return -ENOMEM;