From: Lothar Waßmann Date: Thu, 24 Oct 2013 07:57:09 +0000 (+0200) Subject: ahci_platform: fix error return values in ahci_probe() function X-Git-Tag: KARO-TX6-2013-11-08~17 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=ee8fae723646ed7644c8eca0f91fb104a0885c19 ahci_platform: fix error return values in ahci_probe() function - ENODEV is more appropriate than EINVAL if platform_get_resource() fails - promote the return value from platform_get_irq() rather than inventing a new one Signed-off-by: Lothar Waßmann --- diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index f9554318504f..d3d12be88f96 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -105,13 +105,13 @@ static int ahci_probe(struct platform_device *pdev) mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) { dev_err(dev, "no mmio space\n"); - return -EINVAL; + return -ENODEV; } irq = platform_get_irq(pdev, 0); - if (irq <= 0) { + if (irq < 0) { dev_err(dev, "no irq\n"); - return -EINVAL; + return irq; } if (pdata && pdata->ata_port_info)