diff options
-rw-r--r-- | kernel/trace/trace_events.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index ba3492076ab2..83cc2c01195d 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -1010,9 +1010,12 @@ static int __trace_add_event_call(struct ftrace_event_call *call) | |||
1010 | return -ENOENT; | 1010 | return -ENOENT; |
1011 | 1011 | ||
1012 | list_add(&call->list, &ftrace_events); | 1012 | list_add(&call->list, &ftrace_events); |
1013 | return event_create_dir(call, d_events, &ftrace_event_id_fops, | 1013 | ret = event_create_dir(call, d_events, &ftrace_event_id_fops, |
1014 | &ftrace_enable_fops, &ftrace_event_filter_fops, | 1014 | &ftrace_enable_fops, &ftrace_event_filter_fops, |
1015 | &ftrace_event_format_fops); | 1015 | &ftrace_event_format_fops); |
1016 | if (ret < 0) | ||
1017 | list_del(&call->list); | ||
1018 | return ret; | ||
1016 | } | 1019 | } |
1017 | 1020 | ||
1018 | /* Add an additional event_call dynamically */ | 1021 | /* Add an additional event_call dynamically */ |