[PATCH 2/2] mtd: nand: check the return code of 'read_oob/read_oob_raw'
Artem Bityutskiy
dedekind1 at gmail.com
Fri May 11 07:48:11 EDT 2012
On Wed, 2012-05-09 at 13:13 +0300, Shmulik Ladkani wrote:
> @@ -1826,9 +1827,12 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
>
> while (1) {
> if (ops->mode == MTD_OPS_RAW)
> - chip->ecc.read_oob_raw(mtd, chip, page);
> + ret = chip->ecc.read_oob_raw(mtd, chip, page);
> else
> - chip->ecc.read_oob(mtd, chip, page);
> + ret = chip->ecc.read_oob(mtd, chip, page);
> +
> + if (ret < 0)
> + break;
For page reading the convention is that we keep reading and try to read
everything anyway, I guess it is reasonable thing to do for OOB as well?
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120511/3264411b/attachment.sig>
More information about the linux-mtd
mailing list