diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 18db461f77cd..ff1342671b60 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3241,7 +3241,7 @@ static char *get_trace_buf(void) { struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer); - if (!buffer || buffer->nesting >= 4) + if (!trace_percpu_buffer || buffer->nesting >= 4) return NULL; buffer->nesting++;