Skip to content

Commit

Permalink
riscv: Fix fill_callchain return value
Browse files Browse the repository at this point in the history
commit 2b2b574 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Nikita Shubin authored and Greg Kroah-Hartman committed Apr 8, 2022
1 parent 0f8c0bd commit 24b9b8e
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 @@ -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,
Expand Down

0 comments on commit 24b9b8e

Please sign in to comment.