PCI: dra7xx: Fix platform_get_irq() error handling

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>
This commit is contained in:
Fabio Estevam 2017-08-31 14:52:02 -03:00 committed by Bjorn Helgaas
parent a0d21ba120
commit 2f3ec75245

View 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,