提交 0cfe8245 编写于 作者: S Steven Rostedt

tracing: replace kzalloc with kcalloc

Impact: clean up

kcalloc is a better approach to allocate a NULL array.
Reported-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
上级 5c6a3ae1
......@@ -3328,7 +3328,7 @@ create_trace_option_files(struct tracer *tracer)
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册