aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:57 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-09-07 13:23:57 -0500
commit736266296e892ed9e8594a922cd8bb9c369b7b84 (patch)
tree8fcb82bab3c910e21ba7101a5d74dd2a88ccbc61 /drivers/pci
parentMerge branch 'pci/host-exynos' into next (diff)
parentPCI: faraday: Use PCI_NUM_INTX (diff)
downloadlinux-dev-736266296e892ed9e8594a922cd8bb9c369b7b84.tar.xz
linux-dev-736266296e892ed9e8594a922cd8bb9c369b7b84.zip
Merge branch 'pci/host-faraday' into next
* pci/host-faraday: PCI: faraday: Use PCI_NUM_INTX PCI: faraday: Fix of_irq_get() error check
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-ftpci100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c
index 5162dffc102b..96028f01bc90 100644
--- a/drivers/pci/host/pci-ftpci100.c
+++ b/drivers/pci/host/pci-ftpci100.c
@@ -350,12 +350,12 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p)
/* All PCI IRQs cascade off this one */
irq = of_irq_get(intc, 0);
- if (!irq) {
+ if (irq <= 0) {
dev_err(p->dev, "failed to get parent IRQ\n");
- return -EINVAL;
+ return irq ?: -EINVAL;
}
- p->irqdomain = irq_domain_add_linear(intc, 4,
+ p->irqdomain = irq_domain_add_linear(intc, PCI_NUM_INTX,
&faraday_pci_irqdomain_ops, p);
if (!p->irqdomain) {
dev_err(p->dev, "failed to create Gemini PCI IRQ domain\n");