Browse Source

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>
Steven Rostedt 16 years ago
parent
commit
0cfe82451d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/trace/trace.c

+ 1 - 1
kernel/trace/trace.c

@@ -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;