[PATCH 2/6] tracing/branch-profiler: fix return value check on register_stat_tracer

From: Steven Rostedt
Date: Thu Jun 04 2009 - 01:26:50 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

The branch profiler incorrectly takes a zero return on register_stat_tracer
as an error. But zero means success.

[ Impact: remove annoying false warning on boot up ]

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace_branch.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
index 7a7a9fd..19c618f 100644
--- a/kernel/trace/trace_branch.c
+++ b/kernel/trace/trace_branch.c
@@ -379,7 +379,7 @@ __init static int all_annotated_branch_stats(void)
int ret;

ret = register_stat_tracer(&all_branch_stats);
- if (!ret) {
+ if (ret) {
printk(KERN_WARNING "Warning: could not register "
"all branches stats\n");
return 1;
--
1.6.3.1

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/