riscv: Fix fill_callchain return value
authorNikita Shubin <n.shubin@yadro.com>
Fri, 11 Mar 2022 06:58:15 +0000 (09:58 +0300)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 31 Mar 2022 06:01:42 +0000 (23:01 -0700)
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>
arch/riscv/kernel/perf_callchain.c

index 55faa49..3348a61 100644 (file)
@@ -68,7 +68,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
 
 static bool fill_callchain(void *entry, unsigned long pc)
 {
-       return perf_callchain_store(entry, pc);
+       return perf_callchain_store(entry, pc) == 0;
 }
 
 void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,