Skip to content

Commit

Permalink
[MTD] [NAND] make s3c2410 indicate an error for multi-bit read errors
Browse files Browse the repository at this point in the history
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@vpop.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Matt Reimer authored and David Woodhouse committed Jan 12, 2008
1 parent de7921f commit 4fac9f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fac9f6

Please sign in to comment.