diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 77406fcf53b3..e74678e928cf 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -883,7 +883,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, | |||
883 | } | 883 | } |
884 | 884 | ||
885 | /* Calculate remaining oob bytes */ | 885 | /* Calculate remaining oob bytes */ |
886 | i = oob - chip->oob_poi; | 886 | i = mtd->oobsize - (oob - chip->oob_poi); |
887 | if (i) | 887 | if (i) |
888 | chip->read_buf(mtd, oob, i); | 888 | chip->read_buf(mtd, oob, i); |
889 | 889 | ||
@@ -1334,7 +1334,7 @@ static void nand_write_page_syndrome(struct mtd_info *mtd, | |||
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | /* Calculate remaining oob bytes */ | 1336 | /* Calculate remaining oob bytes */ |
1337 | i = oob - chip->oob_poi; | 1337 | i = mtd->oobsize - (oob - chip->oob_poi); |
1338 | if (i) | 1338 | if (i) |
1339 | chip->write_buf(mtd, oob, i); | 1339 | chip->write_buf(mtd, oob, i); |
1340 | } | 1340 | } |