projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae92dc9
)
[ARM] Use kcalloc to allocate counter_config array rather than kmalloc
author
Russell King
<rmk@dyn-67.arm.linux.org.uk>
Mon, 20 Mar 2006 16:52:32 +0000
(16:52 +0000)
committer
Russell King
<rmk+kernel@arm.linux.org.uk>
Tue, 21 Mar 2006 23:30:02 +0000
(23:30 +0000)
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>
arch/arm/oprofile/common.c
patch
|
blob
|
history
diff --git
a/arch/arm/oprofile/common.c
b/arch/arm/oprofile/common.c
index de72902ad0ca12871522ebb507b71bac314dfa25..6f833358cd0612c4c13e5d59619e86ccee2749e5 100644
(file)
--- 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 = k
malloc(sizeof(struct op_counter_config) * spec->num_counters
,
+ counter_config = k
calloc(spec->num_counters, sizeof(struct op_counter_config)
,
GFP_KERNEL);
if (!counter_config)
return -ENOMEM;