Browse Source

Merge branch 'pci/host-faraday' into next

* pci/host-faraday:
  PCI: faraday: Use PCI_NUM_INTX
  PCI: faraday: Fix of_irq_get() error check
Bjorn Helgaas 8 years ago
parent
commit
736266296e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      drivers/pci/host/pci-ftpci100.c

+ 3 - 3
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");