summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@axis.com>2015-01-20 10:35:32 +0100
committerBrian Norris <computersforpeace@gmail.com>2015-02-06 05:32:20 +0100
commitd164ea32674ec82e80f480769ffcd2144f901380 (patch)
treef6daaef3ade2a221e62d07ee58570edbd275a77e
parentmtd: kconfig: replace PPC_OF with PPC (diff)
downloadlinux-d164ea32674ec82e80f480769ffcd2144f901380.tar.xz
linux-d164ea32674ec82e80f480769ffcd2144f901380.zip
mtd: concat: set the return lengths properly
In concat_read_oob both retlen and oobretlen should be updated. concat_write_oob previously only (improperly) updated retlen. Signed-off-by: Niklas Cassel <niklass@axis.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/mtdconcat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index b9000563b9f4..d85c9468d30c 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -311,7 +311,8 @@ concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops)
devops.len = subdev->size - to;
err = mtd_write_oob(subdev, to, &devops);
- ops->retlen += devops.oobretlen;
+ ops->retlen += devops.retlen;
+ ops->oobretlen += devops.oobretlen;
if (err)
return err;