diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-07-28 19:16:18 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-22 22:28:42 +0300 |
commit | 8116acce5a7aba90d97170d04d4b497afa1b74cf (patch) | |
tree | 62c280d9ed47d9d587751ec79287ed4a55b10503 | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
download | linux-8116acce5a7aba90d97170d04d4b497afa1b74cf.tar.xz |
PCI: keystone: Propagate request_irq() failure
Previously, if request_irq() failed, ks_add_pcie_port() always returned
zero (success). Return the request_irq() failure result instead.
[bhelgaas: changelog]
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-By: Murali Karicheri <m-karicheri2@ti.com>
-rw-r--r-- | drivers/pci/host/pci-keystone.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c index 8ba28834d470..82b461b5b08a 100644 --- a/drivers/pci/host/pci-keystone.c +++ b/drivers/pci/host/pci-keystone.c @@ -334,8 +334,9 @@ static int __init ks_add_pcie_port(struct keystone_pcie *ks_pcie, if (ks_pcie->error_irq <= 0) dev_info(&pdev->dev, "no error IRQ defined\n"); else { - if (request_irq(ks_pcie->error_irq, pcie_err_irq_handler, - IRQF_SHARED, "pcie-error-irq", ks_pcie) < 0) { + ret = request_irq(ks_pcie->error_irq, pcie_err_irq_handler, + IRQF_SHARED, "pcie-error-irq", ks_pcie); + if (ret < 0) { dev_err(&pdev->dev, "failed to request error IRQ %d\n", ks_pcie->error_irq); return ret; |