]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: nand: fix scan_read_raw_oob
authorDmitry Maluka <D.Maluka@adbglobal.com>
Fri, 11 May 2012 17:51:51 +0000 (20:51 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 10 Jun 2012 13:41:50 +0000 (14:41 +0100)
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 <artem.bityutskiy@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/mtd/nand/nand_bbt.c

index 69148ae3bf58aaf806be617894725eb72d1483f1..f024375a9670a0c7bb334bd6ddb69e423ba8af82 100644 (file)
@@ -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;
 }