]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - arch/xtensa/kernel/stacktrace.c
xtensa: fix return_address
[people/arne_f/kernel.git] / arch / xtensa / kernel / stacktrace.c
index 7538d802b65abbc88f2e3769ff77e117282470c7..483593068139a3089e78d8a5a5de950189c0be3e 100644 (file)
@@ -272,10 +272,14 @@ static int return_address_cb(struct stackframe *frame, void *data)
        return 1;
 }
 
+/*
+ * level == 0 is for the return address from the caller of this function,
+ * not from this function itself.
+ */
 unsigned long return_address(unsigned level)
 {
        struct return_addr_data r = {
-               .skip = level + 1,
+               .skip = level,
        };
        walk_stackframe(stack_pointer(NULL), return_address_cb, &r);
        return r.addr;