diff options
| author | Breno Leitao <leitao@debian.org> | 2026-04-20 16:25:09 +0300 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-04-28 21:28:29 +0300 |
| commit | 3b75dd76e64a04771861bb5647951c264919e563 (patch) | |
| tree | 27e8045c5332240d71c921fcd22a44998b93df78 /include/linux/fs_stack.h | |
| parent | 254f49634ee16a731174d2ae34bc50bd5f45e731 (diff) | |
| download | linux-3b75dd76e64a04771861bb5647951c264919e563.tar.xz | |
tracing: branch: Fix inverted check on stat tracer registration
init_annotated_branch_stats() and all_annotated_branch_stats() check the
return value of register_stat_tracer() with "if (!ret)", but
register_stat_tracer() returns 0 on success and a negative errno on
failure. The inverted check causes the warning to be printed on every
successful registration, e.g.:
Warning: could not register annotated branches stats
while leaving real failures silent. The initcall also returned a
hard-coded 1 instead of the actual error.
Invert the check and propagate ret so that the warning fires on real
errors and the initcall reports the correct status.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: https://patch.msgid.link/20260420-tracing-v1-1-d8f4cd0d6af1@debian.org
Fixes: 002bb86d8d42 ("tracing/ftrace: separate events tracing and stats tracing engine")
Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/fs_stack.h')
0 files changed, 0 insertions, 0 deletions
