Browse Source

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 <fabio.estevam@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Duc Dang <dhdang@apm.com>
Fabio Estevam 8 years ago
parent
commit
c7aca96aa4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/pci/host/pci-xgene-msi.c

+ 1 - 1
drivers/pci/host/pci-xgene-msi.c

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