PCI: xgene: 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 <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Duc Dang <[email protected]>
This commit is contained in:
Fabio Estevam 2017-08-31 14:52:06 -03:00 • committed by Bjorn Helgaas
commit c7aca96aa4

View file

@ -489,7 +489,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
if (virt_msir < 0) {
dev_err(&pdev->dev, "Cannot translate IRQ index %d\n",
irq_index);
rc = -EINVAL;
rc = virt_msir;
goto error;
}
xgene_msi->msi_groups[irq_index].gic_irq = virt_msir;