diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-28 03:55:40 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-01 05:53:44 -0400 |
commit | f9ac5a69edee0ee7e06a05727226e3f275306c8d (patch) | |
tree | 76e93260f97e7f810faa811965032814ec36d678 /kernel/trace/kmemtrace.c | |
parent | 33974093c024f08caadd2fc71a83bd811ed1831d (diff) |
kmemtrace: Fix up tracer registration
Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6 ("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: Paul Mundt <lethal@linux-sh.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Frederic 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: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/kmemtrace.c')
-rw-r--r-- | kernel/trace/kmemtrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c index 81b1645c8549..a91da69f153a 100644 --- a/kernel/trace/kmemtrace.c +++ b/kernel/trace/kmemtrace.c | |||
@@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void) | |||
501 | return 1; | 501 | return 1; |
502 | } | 502 | } |
503 | 503 | ||
504 | if (!register_tracer(&kmem_tracer)) { | 504 | if (register_tracer(&kmem_tracer) != 0) { |
505 | pr_warning("Warning: could not register the kmem tracer\n"); | 505 | pr_warning("Warning: could not register the kmem tracer\n"); |
506 | return 1; | 506 | return 1; |
507 | } | 507 | } |