tracing: replace kzalloc with kcalloc
Impact: clean up
kcalloc is a better approach to allocate a NULL array.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 5db7485..9c5987a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3328,7 +3328,7 @@
for (cnt = 0; opts[cnt].name; cnt++)
;
- topts = kzalloc(sizeof(*topts) * (cnt + 1), GFP_KERNEL);
+ topts = kcalloc(cnt + 1, sizeof(*topts), GFP_KERNEL);
if (!topts)
return NULL;