diff options
author | Niklas Cassel <niklas.cassel@axis.com> | 2015-01-20 10:35:32 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-02-05 20:32:20 -0800 |
commit | d164ea32674ec82e80f480769ffcd2144f901380 (patch) | |
tree | f6daaef3ade2a221e62d07ee58570edbd275a77e /drivers/mtd | |
parent | be802bf955a1aa9b92b71395405899ce076eca6e (diff) | |
download | op-kernel-dev-d164ea32674ec82e80f480769ffcd2144f901380.zip op-kernel-dev-d164ea32674ec82e80f480769ffcd2144f901380.tar.gz |
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')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index b900056..d85c946 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; |