]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/nand/diskonchip.c
[MTD] [NAND] Replace -1 with -EBADMSG in nand error correction code
[~andy/linux] / drivers / mtd / nand / diskonchip.c
index 17c868034aad4a8d7cee4851400867bb9b299747..0e72153b329736000e4c43abfc76038b725d5959 100644 (file)
@@ -56,11 +56,6 @@ static unsigned long __initdata doc_locations[] = {
 #endif /*  CONFIG_MTD_DOCPROBE_HIGH */
 #elif defined(__PPC__)
        0xe4000000,
-#elif defined(CONFIG_MOMENCO_OCELOT)
-       0x2f000000,
-       0xff000000,
-#elif defined(CONFIG_MOMENCO_OCELOT_G)
-       0xff000000,
 #else
 #warning Unknown architecture for DiskOnChip. No default probe locations defined
 #endif
@@ -225,7 +220,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
                }
        }
        /* If the parity is wrong, no rescue possible */
-       return parity ? -1 : nerr;
+       return parity ? -EBADMSG : nerr;
 }
 
 static void DoC_Delay(struct doc_priv *doc, unsigned short cycles)
@@ -1039,7 +1034,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
                WriteDOC(DOC_ECC_DIS, docptr, Mplus_ECCConf);
        else
                WriteDOC(DOC_ECC_DIS, docptr, ECCConf);
-       if (no_ecc_failures && (ret == -1)) {
+       if (no_ecc_failures && (ret == -EBADMSG)) {
                printk(KERN_ERR "suppressing ECC failure\n");
                ret = 0;
        }