From: Lothar Waßmann Date: Wed, 7 Aug 2013 06:15:38 +0000 (+0200) Subject: mtd: nand: gpmi-nand: use more sensible error codes at various places X-Git-Tag: MMI-PSA29.97-13-9~13677^2~66 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52a073bd2c2b005250c4254b747d5ad9b2a089a3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mtd: nand: gpmi-nand: use more sensible error codes at various places Acked-by: Huang Shijie Signed-off-by: Lothar Waßmann Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index bcf9bc55bee2..76d2f4142f2d 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);