Skip to content

Commit 84c6cf0

Browse files
Steven Rostedtrostedt
authored andcommitted
tracing: Remove unneeded check of max_tr->buffer before tracing_reset
There's now a check in tracing_reset_online_cpus() if the buffer is allocated or NULL. No need to do a check before calling it with max_tr. Signed-off-by: Steven Rostedt <[email protected]>
1 parent a541641 commit 84c6cf0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,8 +4040,7 @@ static ssize_t tracing_clock_write(struct file *filp, const char __user *ubuf,
40404040
* Reset the buffer so that it doesn't have incomparable timestamps.
40414041
*/
40424042
tracing_reset_online_cpus(&global_trace);
4043-
if (max_tr.buffer)
4044-
tracing_reset_online_cpus(&max_tr);
4043+
tracing_reset_online_cpus(&max_tr);
40454044

40464045
mutex_unlock(&trace_types_lock);
40474046

0 commit comments

Comments
 (0)