summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorNikita Shubin <n.shubin@yadro.com>2022-03-11 09:58:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-08 15:39:52 +0300
commit24b9b8e95ca1bc87e055cf3ee4f8c502c10ef938 (patch)
treefb2d205c54fb3818a0ea7d2b68bfe3575a0ea43b /arch/riscv
parent0f8c0bd0a4cb5f8703aad688788cf0ea957844bc (diff)
downloadlinux-24b9b8e95ca1bc87e055cf3ee4f8c502c10ef938.tar.xz
riscv: Fix fill_callchain return value
commit 2b2b574ac587ec5bd7716a356492a85ab8b0ce9f upstream. perf_callchain_store return 0 on success, -1 otherwise, fix fill_callchain to return correct bool value. Fixes: dbeb90b0c1eb ("riscv: Add perf callchain support") Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/perf_callchain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c
index ad3001cbdf61..20af8ecbb7e4 100644
--- a/arch/riscv/kernel/perf_callchain.c
+++ b/arch/riscv/kernel/perf_callchain.c
@@ -77,7 +77,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
bool fill_callchain(unsigned long pc, void *entry)
{
- return perf_callchain_store(entry, pc);
+ return perf_callchain_store(entry, pc) == 0;
}
void notrace walk_stackframe(struct task_struct *task,