[PATCH 1/7] [MTD] Blackfin NFC Driver: fix bug - do not clobber the status from the first 256 bytes if operating on 512 pages

Bryan Wu cooloney at kernel.org
Sun Jul 27 02:27:53 EDT 2008


From: Mike Frysinger <vapier.adi at gmail.com>

Singed-off-by: Mike Frysinger <vapier.adi at gmail.com>
Signed-off-by: Bryan Wu <cooloney at kernel.org>
---
 drivers/mtd/nand/bf5xx_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index e87a572..3254348 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -273,7 +273,7 @@ static int bf5xx_nand_correct_data(struct mtd_info *mtd, u_char *dat,
 		dat += 256;
 		read_ecc += 8;
 		calc_ecc += 8;
-		ret = bf5xx_nand_correct_data_256(mtd, dat, read_ecc, calc_ecc);
+		ret |= bf5xx_nand_correct_data_256(mtd, dat, read_ecc, calc_ecc);
 	}
 
 	return ret;
-- 
1.5.6




More information about the linux-mtd mailing list