mtd: nand: gpmi-nand: use more sensible error codes at various places

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Aug 30 16:59:02 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=52a073bd2c2b005250c4254b747d5ad9b2a089a3
Commit:     52a073bd2c2b005250c4254b747d5ad9b2a089a3
Parent:     9fe5f52c9eb2f2df2b6ffdab0100f4475fef2ba1
Author:     Lothar Waßmann <LW at KARO-electronics.de>
AuthorDate: Wed Aug 7 08:15:38 2013 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:34:28 2013 +0100

    mtd: nand: gpmi-nand: use more sensible error codes at various places
    
    Acked-by: Huang Shijie <b32955 at freescale.com>
    Signed-off-by: Lothar Waßmann <LW at KARO-electronics.de>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index bcf9bc5..76d2f41 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -354,7 +354,7 @@ static int acquire_register_block(struct gpmi_nand_data *this,
 	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
 	if (!r) {
 		pr_err("Can't get resource for %s\n", res_name);
-		return -ENXIO;
+		return -ENODEV;
 	}
 
 	p = ioremap(r->start, resource_size(r));
@@ -395,7 +395,7 @@ static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
 	r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);
 	if (!r) {
 		pr_err("Can't get resource for %s\n", res_name);
-		return -ENXIO;
+		return -ENODEV;
 	}
 
 	err = request_irq(r->start, irq_h, 0, res_name, this);
@@ -1584,7 +1584,7 @@ static int gpmi_nand_probe(struct platform_device *pdev)
 		pdev->id_entry = of_id->data;
 	} else {
 		pr_err("Failed to find the right device id.\n");
-		return -ENOMEM;
+		return -ENODEV;
 	}
 
 	this = kzalloc(sizeof(*this), GFP_KERNEL);



More information about the linux-mtd-cvs mailing list