Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=30a7eb298af849bae3050e0a3f4c130995da22b0
Commit:     30a7eb298af849bae3050e0a3f4c130995da22b0
Parent:     34627f0e768de6af95e3523c29a16cbb95ce3197
Author:     Adrian Hunter <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 10:19:38 2007 +0300
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Sun Oct 14 13:37:41 2007 +0100

    [MTD] [OneNAND] Return only negative error codes
    
    The OneNAND driver was confusing JFFS2 by returning positive error
    codes.
    
    Signed-off-by: Adrian Hunter <[EMAIL PROTECTED]>
    Acked-by: Kyungmin Park <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/onenand/onenand_base.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index f633941..a8c426b 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -327,7 +327,7 @@ static int onenand_wait(struct mtd_info *mtd, int state)
                printk(KERN_ERR "onenand_wait: controller error = 0x%04x\n", 
ctrl);
                if (ctrl & ONENAND_CTRL_LOCK)
                        printk(KERN_ERR "onenand_wait: it's locked error.\n");
-               return ctrl;
+               return -EIO;
        }
 
        if (interrupt & ONENAND_INT_READ) {
@@ -336,7 +336,7 @@ static int onenand_wait(struct mtd_info *mtd, int state)
                        if (ecc & ONENAND_ECC_2BIT_ALL) {
                                printk(KERN_ERR "onenand_wait: ECC error = 
0x%04x\n", ecc);
                                mtd->ecc_stats.failed++;
-                               return ecc;
+                               return -EBADMSG;
                        } else if (ecc & ONENAND_ECC_1BIT_ALL) {
                                printk(KERN_INFO "onenand_wait: correctable ECC 
error = 0x%04x\n", ecc);
                                mtd->ecc_stats.corrected++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to