aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 210e71ff82d..4488d90e75e 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -656,11 +656,13 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events)
656 return -1; 656 return -1;
657 } 657 }
658 658
659 entry = debugfs_create_file("enable", 0644, call->dir, call, 659 if (call->regfunc) {
660 &ftrace_enable_fops); 660 entry = debugfs_create_file("enable", 0644, call->dir, call,
661 if (!entry) 661 &ftrace_enable_fops);
662 pr_warning("Could not create debugfs " 662 if (!entry)
663 "'%s/enable' entry\n", call->name); 663 pr_warning("Could not create debugfs "
664 "'%s/enable' entry\n", call->name);
665 }
664 666
665 /* Only let type be writable, if we can change it */ 667 /* Only let type be writable, if we can change it */
666 entry = debugfs_create_file("type", 668 entry = debugfs_create_file("type",