Commit 52a073bd authored by Lothar Waßmann's avatar Lothar Waßmann Committed by David Woodhouse

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

Acked-by: default avatarHuang Shijie <b32955@freescale.com>
Signed-off-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 9fe5f52c
...@@ -354,7 +354,7 @@ static int acquire_register_block(struct gpmi_nand_data *this, ...@@ -354,7 +354,7 @@ static int acquire_register_block(struct gpmi_nand_data *this,
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
if (!r) { if (!r) {
pr_err("Can't get resource for %s\n", res_name); pr_err("Can't get resource for %s\n", res_name);
return -ENXIO; return -ENODEV;
} }
p = ioremap(r->start, resource_size(r)); 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) ...@@ -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); r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);
if (!r) { if (!r) {
pr_err("Can't get resource for %s\n", res_name); 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); err = request_irq(r->start, irq_h, 0, res_name, this);
...@@ -1584,7 +1584,7 @@ static int gpmi_nand_probe(struct platform_device *pdev) ...@@ -1584,7 +1584,7 @@ static int gpmi_nand_probe(struct platform_device *pdev)
pdev->id_entry = of_id->data; pdev->id_entry = of_id->data;
} else { } else {
pr_err("Failed to find the right device id.\n"); pr_err("Failed to find the right device id.\n");
return -ENOMEM; return -ENODEV;
} }
this = kzalloc(sizeof(*this), GFP_KERNEL); this = kzalloc(sizeof(*this), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment