Commit f9ac5a69 authored by Paul Mundt's avatar Paul Mundt Committed by Ingo Molnar

kmemtrace: Fix up tracer registration

Commit ddc1637a ("kmemtrace: Print
binary output only if 'bin' option is set") ended up inverting the
error detection logic. register_tracer() returns 0 on success,
which this change caused to treat as an error, resulting in:

[    0.132000] Warning: could not register the kmem tracer

as well as bailing out of the initcall with an error value. This
restores the old logic.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Acked-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <20090928075540.GD6668@linux-sh.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 33974093
...@@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void) ...@@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void)
return 1; return 1;
} }
if (!register_tracer(&kmem_tracer)) { if (register_tracer(&kmem_tracer) != 0) {
pr_warning("Warning: could not register the kmem tracer\n"); pr_warning("Warning: could not register the kmem tracer\n");
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment