Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Niklas Cassel and committed by
Brian Norris
d164ea32 be802bf9

+2 -1
+2 -1
drivers/mtd/mtdconcat.c
··· 311 311 devops.len = subdev->size - to; 312 312 313 313 err = mtd_write_oob(subdev, to, &devops); 314 - ops->retlen += devops.oobretlen; 314 + ops->retlen += devops.retlen; 315 + ops->oobretlen += devops.oobretlen; 315 316 if (err) 316 317 return err; 317 318