]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Have event_enable_write() just return error on error
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 19 Dec 2024 20:12:01 +0000 (15:12 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 26 Dec 2024 15:38:36 +0000 (10:38 -0500)
commitcad1d5bd2cb9921189749b5d796026c768f56236
treeecfd95aff79968473f0209fdc58f615053cbc2c3
parentd1e27ee9c6f21ccbb3f2d910171427ceb66a0af1
tracing: Have event_enable_write() just return error on error

The event_enable_write() function is inconsistent in how it returns
errors. Sometimes it updates the ppos parameter and sometimes it doesn't.
Simplify the code to just return an error or the count if there isn't an
error.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/20241219201345.025284170@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events.c