tracing: fix return value to registering events
authorSteven Rostedt <srostedt@redhat.com>
Tue, 3 Mar 2009 14:43:50 +0000 (09:43 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Tue, 3 Mar 2009 14:43:50 +0000 (09:43 -0500)
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>
kernel/trace/trace_events_stage_3.h

index c62a4d2a528331fe20f3e3192e41e5144d17d63d..041789ffbac1da993bdc5894116ec968fbde96ff 100644 (file)
@@ -120,9 +120,9 @@ static int ftrace_reg_event_##call(void)                            \
        int ret;                                                        \
                                                                        \
        ret = register_trace_##call(ftrace_event_##call);               \
-       if (!ret)                                                       \
+       if (ret)                                                        \
                pr_info("event trace: Could not activate trace point "  \
-                       "probe to " #call);                             \
+                       "probe to " #call "\n");                        \
        return ret;                                                     \
 }                                                                      \
                                                                        \
@@ -195,9 +195,9 @@ static int ftrace_raw_reg_event_##call(void)                                \
        int ret;                                                        \
                                                                        \
        ret = register_trace_##call(ftrace_raw_event_##call);           \
-       if (!ret)                                                       \
+       if (ret)                                                        \
                pr_info("event trace: Could not activate trace point "  \
-                       "probe to " #call);                             \
+                       "probe to " #call "\n");                        \
        return ret;                                                     \
 }                                                                      \
                                                                        \