diff --git a/arch/riscv/core/stacktrace.c b/arch/riscv/core/stacktrace.c index 54f70162420..361e152f00c 100644 --- a/arch/riscv/core/stacktrace.c +++ b/arch/riscv/core/stacktrace.c @@ -227,10 +227,7 @@ void arch_stack_walk(stack_trace_callback_fn callback_fn, void *cookie, static bool in_fatal_stack_bound(uintptr_t addr, const struct k_thread *const thread, const struct arch_esf *esf) { - const uintptr_t align = - COND_CODE_1(CONFIG_FRAME_POINTER, (ARCH_STACK_PTR_ALIGN), (sizeof(uintptr_t))); - - if (!IS_ALIGNED(addr, align)) { + if (!IS_ALIGNED(addr, sizeof(uintptr_t))) { return false; }