diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2017-08-31 19:52:09 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-09-05 20:38:19 +0200 |
commit | 81edd471a61474de1ea772f27a3c734a68a09cc6 (patch) | |
tree | 3e122c9c84e57a21c395ddb47ce3e7934581ace6 /drivers/pci/host/pcie-rockchip.c | |
parent | PCI: rockchip: Umap IO space if probe fails (diff) | |
download | linux-81edd471a61474de1ea772f27a3c734a68a09cc6.tar.xz linux-81edd471a61474de1ea772f27a3c734a68a09cc6.zip |
PCI: rockchip: 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: Shawn Lin <shawn.lin@rock-chips.com>
Diffstat (limited to 'drivers/pci/host/pcie-rockchip.c')
-rw-r--r-- | drivers/pci/host/pcie-rockchip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index 56c2423ea021..d205381c7ec4 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -962,7 +962,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) irq = platform_get_irq_byname(pdev, "sys"); if (irq < 0) { dev_err(dev, "missing sys IRQ resource\n"); - return -EINVAL; + return irq; } err = devm_request_irq(dev, irq, rockchip_pcie_subsys_irq_handler, @@ -975,7 +975,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) irq = platform_get_irq_byname(pdev, "legacy"); if (irq < 0) { dev_err(dev, "missing legacy IRQ resource\n"); - return -EINVAL; + return irq; } irq_set_chained_handler_and_data(irq, @@ -985,7 +985,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip) irq = platform_get_irq_byname(pdev, "client"); if (irq < 0) { dev_err(dev, "missing client IRQ resource\n"); - return -EINVAL; + return irq; } err = devm_request_irq(dev, irq, rockchip_pcie_client_irq_handler, |