[MTD] [NAND] make s3c2410 indicate an error for multi-bit read errors
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Jan 12 09:59:01 EST 2008
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4fac9f698404a5cd50b978fbdb7e54235353c215
Commit: 4fac9f698404a5cd50b978fbdb7e54235353c215
Parent: de7921f01a407e0cb38143363995db89a5f9a5c5
Author: Matt Reimer <mreimer at vpop.net>
AuthorDate: Thu Oct 18 18:02:44 2007 -0700
Committer: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sat Jan 12 14:46:31 2008 +0000
[MTD] [NAND] make s3c2410 indicate an error for multi-bit read errors
If there were multiple bit errors in the data s3c2410_nand_correct_data()
was returning 0 (no error) instead of -1, so the upper layers (like JFFS2)
would not know the data is corrupt.
Signed-off-by: Matt Reimer <mreimer at vpop.net>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/mtd/nand/s3c2410.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 512acfc..21a2cc8 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -401,7 +401,7 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
if ((diff0 & ~(1<<fls(diff0))) == 0)
return 1;
- return 0;
+ return -1;
}
/* ECC functions
More information about the linux-mtd-cvs
mailing list