Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cfe8245 authored by Steven Rostedt's avatar Steven Rostedt
Browse files

tracing: replace kzalloc with kcalloc



Impact: clean up

kcalloc is a better approach to allocate a NULL array.

Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent 5c6a3ae1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3328,7 +3328,7 @@ create_trace_option_files(struct tracer *tracer)
	for (cnt = 0; opts[cnt].name; cnt++)
	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)
	if (!topts)
		return NULL;
		return NULL;