diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index b45141748af5..19261fdd2455 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -481,6 +481,11 @@ int register_ftrace_event(struct trace_event *event) | |||
481 | 481 | ||
482 | mutex_lock(&trace_event_mutex); | 482 | mutex_lock(&trace_event_mutex); |
483 | 483 | ||
484 | if (!event) { | ||
485 | ret = next_event_type++; | ||
486 | goto out; | ||
487 | } | ||
488 | |||
484 | if (!event->type) | 489 | if (!event->type) |
485 | event->type = next_event_type++; | 490 | event->type = next_event_type++; |
486 | else if (event->type > __TRACE_LAST_TYPE) { | 491 | else if (event->type > __TRACE_LAST_TYPE) { |