aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/nand_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c8cbc00243fe..0a54d003ef34 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd,
1204 pos = steps * (eccsize + chunk); 1204 pos = steps * (eccsize + chunk);
1205 steps = 0; 1205 steps = 0;
1206 } else 1206 } else
1207 pos = eccsize + chunk; 1207 pos = eccsize;
1208 1208
1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); 1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
1210 for (i = 0; i < steps; i++) { 1210 for (i = 0; i < steps; i++) {
@@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
1567 bytes = min_t(size_t, len, free->length); 1567 bytes = min_t(size_t, len, free->length);
1568 boffs = free->offset; 1568 boffs = free->offset;
1569 } 1569 }
1570 memcpy(chip->oob_poi + woffs, oob, bytes); 1570 memcpy(chip->oob_poi + boffs, oob, bytes);
1571 oob += bytes; 1571 oob += bytes;
1572 } 1572 }
1573 return oob; 1573 return oob;