PCI: dra7xx: Fix platform_get_irq() error handling
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 31 Aug 2017 17:52:02 +0000 (14:52 -0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 5 Sep 2017 18:29:46 +0000 (13:29 -0500)
When platform_get_irq() fails we should propagate the real error value
instead of always returning -EINVAL.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/dwc/pci-dra7xx.c

index 34d86896694a1b83b848513d14587ce6682e3098..d72b557fea112e3893eadbe9c8fe8daf31fbeda2 100644 (file)
@@ -435,7 +435,7 @@ static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
        pp->irq = platform_get_irq(pdev, 1);
        if (pp->irq < 0) {
                dev_err(dev, "missing IRQ resource\n");
-               return -EINVAL;
+               return pp->irq;
        }
 
        ret = devm_request_irq(dev, pp->irq, dra7xx_pcie_msi_irq_handler,