summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorGil Fruchter <gilf@ezchip.com>2015-06-09 10:32:34 +0300
committerSteven Rostedt <rostedt@goodmis.org>2015-07-20 22:30:42 -0400
commit9fe6b778ca93e6171dbb8e54df557a278a91abea (patch)
tree2a576a48a6c22654d75a3e093292516b7afb42d8 /kernel/trace
parent52721d9d3334c1cb1f76219a161084094ec634dc (diff)
downloadtalos-op-linux-9fe6b778ca93e6171dbb8e54df557a278a91abea.tar.gz
talos-op-linux-9fe6b778ca93e6171dbb8e54df557a278a91abea.zip
tracing: Prefer kcalloc over kzalloc with multiply
Use kcalloc for allocating an array instead of kzalloc with multiply, as that is what kcalloc is used for. Found with checkpatch. Link: http://lkml.kernel.org/r/1433835155-6894-2-git-send-email-gilf@ezchip.com Signed-off-by: Gil Fruchter <gilf@ezchip.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index abcbf7ff8743..5d219384b4d1 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3035,7 +3035,7 @@ __tracing_open(struct inode *inode, struct file *file, bool snapshot)
if (!iter)
return ERR_PTR(-ENOMEM);
- iter->buffer_iter = kzalloc(sizeof(*iter->buffer_iter) * num_possible_cpus(),
+ iter->buffer_iter = kcalloc(num_possible_cpus(), sizeof(*iter->buffer_iter),
GFP_KERNEL);
if (!iter->buffer_iter)
goto release;
OpenPOWER on IntegriCloud