diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index 200baaba6a2707c28fabc82cb93054158cdff5c0..c0b9b2970ecac0c2e89719717ba34a6f6218b82b 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -85,7 +85,7 @@ int do_elf_reloc_fixups(void)
 				*offset_ptr_ram += gd->reloc_off;
 			}
 		}
-	} while (re_src++ < re_end);
+	} while (++re_src < re_end);
 
 	return 0;
 }