mtd: nand: fix scan_read_raw_oob

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Jun 1 15:59:02 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=34a5704d91d6f8376a4c0a0143a1dd3eb3ccb37e
Commit:     34a5704d91d6f8376a4c0a0143a1dd3eb3ccb37e
Parent:     52c2d9aad4923536c10d278e02da2e0254e46ee0
Author:     Dmitry Maluka <D.Maluka at adbglobal.com>
AuthorDate: Fri May 11 20:51:51 2012 +0300
Committer:  Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
CommitDate: Tue May 29 11:14:58 2012 +0300

    mtd: nand: fix scan_read_raw_oob
    
    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 at linux.intel.com>
    Cc: stable at kernel.org
---
 drivers/mtd/nand/nand_bbt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 20a112f..30d1319 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;
 }



More information about the linux-mtd-cvs mailing list