projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c6a3ae
)
tracing: replace kzalloc with kcalloc
author
Steven Rostedt
<srostedt@redhat.com>
Fri, 27 Feb 2009 15:51:10 +0000
(10:51 -0500)
committer
Steven Rostedt
<srostedt@redhat.com>
Fri, 27 Feb 2009 15:51:10 +0000
(10:51 -0500)
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>
kernel/trace/trace.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 5db7485158df25de1fa52f7512744be41c6e080e..9c5987aca74bc2ca899e5c9b8cc9f8b774fe56a4 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-3328,7
+3328,7
@@
create_trace_option_files(struct tracer *tracer)
for (cnt = 0; opts[cnt].name; cnt++)
;
- topts = k
zalloc(sizeof(*topts) * (cnt + 1
), GFP_KERNEL);
+ topts = k
calloc(cnt + 1, sizeof(*topts
), GFP_KERNEL);
if (!topts)
return NULL;