res = mtd->read_oob(mtd, offs, &ops);
- /* Ignore ECC errors when checking for BBM */
- if (res && res != -EUCLEAN && res != -EBADMSG)
+ if (res)
return res;
buf += mtd->oobsize + mtd->writesize;
int ret, j;
ret = scan_read_raw_oob(mtd, buf, offs, readlen);
- if (ret)
+ /* Ignore ECC errors when checking for BBM */
+ if (ret && ret != -EUCLEAN && ret != -EBADMSG)
return ret;
for (j = 0; j < len; j++, buf += scanlen) {