[PATCH] ftrace:fix check for return value of register_module_notifier(v2)
From: Ming Lei
Date: Sun May 17 2009 - 03:26:28 EST
return zero should be correct, so fix it.
Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx>
Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
---
kernel/trace/ftrace.c | 2 +-
kernel/trace/trace_events.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5b606f4..140699a 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2826,7 +2826,7 @@ void __init ftrace_init(void)
__stop_mcount_loc);
ret = register_module_notifier(&ftrace_module_nb);
- if (!ret)
+ if (ret)
pr_warning("Failed to register trace ftrace module notifier\n");
return;
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 0eec0c5..9e91c4a 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1174,7 +1174,7 @@ static __init int event_trace_init(void)
}
ret = register_module_notifier(&trace_module_nb);
- if (!ret)
+ if (ret)
pr_warning("Failed to register trace events module notifier\n");
return 0;
--
1.6.0.GIT
--
Lei Ming
--
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/