PCI: xilinx-nwl: Fix platform_get_irq() error handling
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 31 Aug 2017 17:52:10 +0000 (14:52 -0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 5 Sep 2017 18:41:13 +0000 (13:41 -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>
Cc: Michal Simek <michal.simek@xilinx.com>
drivers/pci/host/pcie-xilinx-nwl.c

index 573847f4b9bceaa3719d5b0b37efb626864ecce3..65dea98b2643fb18469799a9e784ce8571416912 100644 (file)
@@ -812,7 +812,7 @@ static int nwl_pcie_parse_dt(struct nwl_pcie *pcie,
        pcie->irq_intx = platform_get_irq_byname(pdev, "intx");
        if (pcie->irq_intx < 0) {
                dev_err(dev, "failed to get intx IRQ %d\n", pcie->irq_intx);
-               return -EINVAL;
+               return pcie->irq_intx;
        }
 
        irq_set_chained_handler_and_data(pcie->irq_intx,