summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdconcat.c
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-05 20:32:20 -0800
commitd164ea32674ec82e80f480769ffcd2144f901380 (patch)
treef6daaef3ade2a221e62d07ee58570edbd275a77e /drivers/mtd/mtdconcat.c
parentbe802bf955a1aa9b92b71395405899ce076eca6e (diff)
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>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-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;