Fix eraseblock walking and add a few more checks to make sure such bugs get caught in the future

I found this bug during a code review. A consistency check for
eraseblock definitions has been merged as well.

Corresponding to flashrom svn r800.

Signed-off-by: Carl-Daniel Hailfinger <>
Acked-by: Sean Nelson <>
1 file changed