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:
parent
be802bf955
commit
d164ea3267
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue