mtd: nand: s3c2410: fix bug in s3c2410_nand_correct_data()
If there is only one bit difference in the ECC, the function should return 1. The result of "diff0 & ~(1<<fls(diff0))" is equal to diff0, so the function actually returns -1. Signed-off-by: NZhaoxiu Zeng <zhaoxiu.zeng@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
Showing
想要评论请 注册 或 登录