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>
This commit is contained in:
Niklas Cassel 2015-01-20 10:35:32 +01:00 committed by Brian Norris
parent be802bf955
commit d164ea3267
1 changed files with 2 additions and 1 deletions

View File

@ -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;