Skip to content

Commit

Permalink
riscv: Fix fill_callchain return value
Browse files Browse the repository at this point in the history
perf_callchain_store return 0 on success, -1 otherwise,
fix fill_callchain to return correct bool value.

Fixes: dbeb90b ("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>
  • Loading branch information
Nikita Shubin authored and Palmer Dabbelt committed Mar 31, 2022
1 parent 6846d65 commit 2b2b574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/kernel/perf_callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2b2b574

Please sign in to comment.