Skip to content

Commit

Permalink
ftrace: fix check for return value of register_module_notifier in eve…
Browse files Browse the repository at this point in the history
…nt_trace_init

register_module_notifier() returns zero in the success case.
So fix the inverted fail case check in trace events modules
handler.

[ Impact: fix spurious warning on ftrace initialization]

Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Ming Lei authored and Frederic Weisbecker committed May 20, 2009
1 parent fd51d25 commit 5537937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5537937

Please sign in to comment.