]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/ahci_platform.c
ahci_platform: fix error return values in ahci_probe() function
[karo-tx-linux.git] / drivers / ata / ahci_platform.c
index 7d3b85385bfc16b92ffe303acf38f343331dfc2e..d3d12be88f96712de71bbf304539e99448a52e3f 100644 (file)
@@ -49,10 +49,11 @@ static struct platform_device_id ahci_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, ahci_devtype);
 
-static struct ata_port_operations ahci_platform_ops = {
+struct ata_port_operations ahci_platform_ops = {
        .inherits       = &ahci_ops,
        .host_stop      = ahci_host_stop,
 };
+EXPORT_SYMBOL_GPL(ahci_platform_ops);
 
 static struct ata_port_operations ahci_platform_retry_srst_ops = {
        .inherits       = &ahci_pmp_retry_srst_ops,
@@ -104,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)