generic-2.6: fix nand_correct_data() return code on 2.6.28
authorGabor Juhos <juhosg@openwrt.org>
Sun, 18 Jan 2009 10:02:55 +0000 (10:02 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 18 Jan 2009 10:02:55 +0000 (10:02 +0000)
SVN-Revision: 14086

target/linux/generic-2.6/patches-2.6.28/090-mtd_fix_nand_correct_data_return_code.patch [new file with mode: 0644]

diff --git a/target/linux/generic-2.6/patches-2.6.28/090-mtd_fix_nand_correct_data_return_code.patch b/target/linux/generic-2.6/patches-2.6.28/090-mtd_fix_nand_correct_data_return_code.patch
new file mode 100644 (file)
index 0000000..be2c7d7
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/nand/nand_ecc.c
++++ b/drivers/mtd/nand/nand_ecc.c
+@@ -492,8 +492,7 @@ int nand_correct_data(struct mtd_info *m
+       if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
+               return 1;       /* error in ecc data; no action needed */
+-      printk(KERN_ERR "uncorrectable error : ");
+-      return -1;
++      return -EBADMSG;
+ }
+ EXPORT_SYMBOL(nand_correct_data);