Skip to content

Commit

Permalink
PCI: keystone: Propagate request_irq() failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Bjorn Helgaas committed Aug 22, 2016
1 parent 29b4817 commit 8116acc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/pci/host/pci-keystone.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8116acc

Please sign in to comment.