From: Dmitry Maluka Date: Fri, 11 May 2012 17:51:51 +0000 (+0300) Subject: mtd: nand: fix scan_read_raw_oob X-Git-Tag: v3.2.20~47 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=48b0fff1aa1f5c4c9258034c2ba087e6dec0b470;p=karo-tx-linux.git mtd: nand: fix scan_read_raw_oob commit 34a5704d91d6f8376a4c0a0143a1dd3eb3ccb37e upstream. It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which should cause wrong functioning of NAND_BBT_SCANALLPAGES option. Artem: the patch did not apply and I had to amend it a bit. Signed-off-by: Artem Bityutskiy Signed-off-by: Ben Hutchings --- diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 69148ae3bf58..f024375a9670 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -324,6 +324,7 @@ static int scan_read_raw_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs, buf += mtd->oobsize + mtd->writesize; len -= mtd->writesize; + offs += mtd->writesize; } return 0; }