static int erasecrosstest(void)
{
size_t read = 0, written = 0;
- int err = 0, i, ebnum, ok = 1, ebnum2;
+ int err = 0, i, ebnum, ebnum2;
loff_t addr0;
char *readbuf = twopages;
if (memcmp(writebuf, readbuf, pgsize)) {
printk(PRINT_PREF "verify failed!\n");
errcnt += 1;
- ok = 0;
- return err;
+ return -1;
}
printk(PRINT_PREF "erasing block %d\n", ebnum);
if (memcmp(writebuf, readbuf, pgsize)) {
printk(PRINT_PREF "verify failed!\n");
errcnt += 1;
- ok = 0;
+ return -1;
}
- if (ok && !err)
+ if (!err)
printk(PRINT_PREF "erasecrosstest ok\n");
return err;
}