projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b460440
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:31 +0000
(09:47 -0700)
commit
aaf6ac0f0871cb7fc0f28f3a00edf329bc7adc29
upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_events.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace_events.c
b/kernel/trace/trace_events.c
index 69532630a2d6d1d7b3e20e00bc7f2bdc8d7ac95c..5f9a002d17d13b5a59bcefcee3297729d244be28 100644
(file)
--- a/
kernel/trace/trace_events.c
+++ b/
kernel/trace/trace_events.c
@@
-114,7
+114,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;
@@
-131,11
+131,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,