projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b3d062
)
tracing: Do not call kmem_cache_free() on allocation failure
author
Namhyung Kim
<namhyung.kim@lge.com>
Fri, 7 Jun 2013 06:07:48 +0000
(15:07 +0900)
committer
Steven Rostedt
<rostedt@goodmis.org>
Tue, 11 Jun 2013 22:38:52 +0000
(18:38 -0400)
There's no point calling it when _alloc() failed.
Link:
http://lkml.kernel.org/r/1370585268-29169-1-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace_events.c
b/kernel/trace/trace_events.c
index db086f172cf58e40d9382d26154c6cc690e8137e..f57b01574a30f5237efa63b16cf44c8e91ca4fbd 100644
(file)
--- a/
kernel/trace/trace_events.c
+++ b/
kernel/trace/trace_events.c
@@
-97,7
+97,7
@@
static int __trace_define_field(struct list_head *head, const char *type,
field = kmem_cache_alloc(field_cachep, GFP_TRACE);
if (!field)
-
goto err
;
+
return -ENOMEM
;
field->name = name;
field->type = type;
@@
-114,11
+114,6
@@
static int __trace_define_field(struct list_head *head, const char *type,
list_add(&field->link, head);
return 0;
-
-err:
- kmem_cache_free(field_cachep, field);
-
- return -ENOMEM;
}
int trace_define_field(struct ftrace_event_call *call, const char *type,
This page took
0.02591 seconds
and
5
git commands to generate.