diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-03 09:43:50 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-03 09:43:50 -0500 |
commit | 633ddaa7f471e9db181f993c1458d6f4bae321ca (patch) | |
tree | 2bf2e419c004cdbce77b1ba3b4cbd5c28cf45bd7 | |
parent | c79a61f55773d2519fd0525bf58385f7d20752d3 (diff) |
tracing: fix return value to registering events
The registering of events had the return value check backwards.
A zero returned is success, the check had it as a failure.
This patch also fixes a missing "\n" in the warning that the check
failed.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r-- | kernel/trace/trace_events_stage_3.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h index c62a4d2a5283..041789ffbac1 100644 --- a/kernel/trace/trace_events_stage_3.h +++ b/kernel/trace/trace_events_stage_3.h | |||
@@ -120,9 +120,9 @@ static int ftrace_reg_event_##call(void) \ | |||
120 | int ret; \ | 120 | int ret; \ |
121 | \ | 121 | \ |
122 | ret = register_trace_##call(ftrace_event_##call); \ | 122 | ret = register_trace_##call(ftrace_event_##call); \ |
123 | if (!ret) \ | 123 | if (ret) \ |
124 | pr_info("event trace: Could not activate trace point " \ | 124 | pr_info("event trace: Could not activate trace point " \ |
125 | "probe to " #call); \ | 125 | "probe to " #call "\n"); \ |
126 | return ret; \ | 126 | return ret; \ |
127 | } \ | 127 | } \ |
128 | \ | 128 | \ |
@@ -195,9 +195,9 @@ static int ftrace_raw_reg_event_##call(void) \ | |||
195 | int ret; \ | 195 | int ret; \ |
196 | \ | 196 | \ |
197 | ret = register_trace_##call(ftrace_raw_event_##call); \ | 197 | ret = register_trace_##call(ftrace_raw_event_##call); \ |
198 | if (!ret) \ | 198 | if (ret) \ |
199 | pr_info("event trace: Could not activate trace point " \ | 199 | pr_info("event trace: Could not activate trace point " \ |
200 | "probe to " #call); \ | 200 | "probe to " #call "\n"); \ |
201 | return ret; \ | 201 | return ret; \ |
202 | } \ | 202 | } \ |
203 | \ | 203 | \ |