Skip to content

Commit

Permalink
tracing: Remove unneeded check of max_tr->buffer before tracing_reset
Browse files Browse the repository at this point in the history
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 <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Jan 21, 2013
1 parent a541641 commit 84c6cf0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -4040,8 +4040,7 @@ static ssize_t tracing_clock_write(struct file *filp, const char __user *ubuf,
* Reset the buffer so that it doesn't have incomparable timestamps.
*/
tracing_reset_online_cpus(&global_trace);
if (max_tr.buffer)
tracing_reset_online_cpus(&max_tr);
tracing_reset_online_cpus(&max_tr);

mutex_unlock(&trace_types_lock);

Expand Down

0 comments on commit 84c6cf0

Please sign in to comment.