Index: kernel/arch/mips32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/mips32/src/debug/stacktrace.c	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
+++ kernel/arch/mips32/src/debug/stacktrace.c	(revision df1cbb397b1a548067ce251bf1d5267217bbf6e9)
@@ -159,6 +159,8 @@
 
 			/* Seek to the end of this function. */
-			for (cur = inst + 1; !IS_JR_RA(*cur); cur++)
-				;
+			cur = inst + 1;
+			while (!IS_JR_RA(*cur))
+				cur++;
+
 			/* Scan the last basic block */
 			for (cur--; !is_jump(*(cur - 1)); cur--) {
