[PATCH] mtd: update ops->oobretlen in concat_write_oob

Niklas Cassel
2015-01-20T09:37:33Z

In concat_read_oob both retlen and oobretlen is updated.
concat_write_oob previously only updated retlen.

Signed-off-by: Niklas Cassel <niklass@axis.com>
---
drivers/mtd/mtdconcat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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;

--
2.1.4