riscv: ftrace: correct the condition logic in function graph tracer
authorZong Li <zong.li@sifive.com>
Mon, 23 Dec 2019 08:46:13 +0000 (16:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:19:02 +0000 (10:19 +0100)
commitac8e28a9b2ffa4667bfe1b1d2712d0bb8954bee8
treed47b9b900c848784729a78dcd353bc60a995d57d
parent316a9a84dbaf628b74d30fd3e1a5dac739e125ed
riscv: ftrace: correct the condition logic in function graph tracer

commit 1d8f65798240b6577d8c44d20c8ea8f1d429e495 upstream.

The condition should be logical NOT to assign the hook address to parent
address. Because the return value 0 of function_graph_enter upon
success.

Fixes: e949b6db51dc (riscv/function_graph: Simplify with function_graph_enter())
Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/kernel/ftrace.c