[kernel] generic-2.6: fix nand_correct_data() return code on 2.6.28
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.28 / 090-mtd_fix_nand_correct_data_return_code.patch
1 --- a/drivers/mtd/nand/nand_ecc.c
2 +++ b/drivers/mtd/nand/nand_ecc.c
3 @@ -492,8 +492,7 @@ int nand_correct_data(struct mtd_info *m
4 if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
5 return 1; /* error in ecc data; no action needed */
6
7 - printk(KERN_ERR "uncorrectable error : ");
8 - return -1;
9 + return -EBADMSG;
10 }
11 EXPORT_SYMBOL(nand_correct_data);
12