mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:10:49 +07:00
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>
This commit is contained in:
parent
5c6a3ae1b4
commit
0cfe82451d
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user