}
/* Calculate remaining oob bytes */
- i = oob - chip->oob_poi;
+ i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->read_buf(mtd, oob, i);
}
/* Calculate remaining oob bytes */
- i = oob - chip->oob_poi;
+ i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->write_buf(mtd, oob, i);
}