aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nftlcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index fb86cacd5bdb..665d3eba2f47 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -181,7 +181,7 @@ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
181 int res; 181 int res;
182 182
183 ops.mode = MTD_OOB_PLACE; 183 ops.mode = MTD_OOB_PLACE;
184 ops.ooboffs = offs; 184 ops.ooboffs = offs & (mtd->writesize - 1);
185 ops.ooblen = mtd->oobsize; 185 ops.ooblen = mtd->oobsize;
186 ops.oobbuf = oob; 186 ops.oobbuf = oob;
187 ops.datbuf = buf; 187 ops.datbuf = buf;