diff options
-rw-r--r-- | kernel/trace/trace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index dfbd86c..0ed4df0 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4474,6 +4474,9 @@ static void tracing_init_debugfs_percpu(long cpu) struct dentry *d_cpu; char cpu_dir[30]; /* 30 characters should be more than enough */ + if (!d_percpu) + return; + snprintf(cpu_dir, 30, "cpu%ld", cpu); d_cpu = debugfs_create_dir(cpu_dir, d_percpu); if (!d_cpu) { |