Skip to contentSkip to conversation

PCI: dra7xx: Add TI DRA7xx PCIe driver

DISCUSSION Dan Carpenter 1 participant 1 message Jul 31, 2014 PCI

lore
Share & tools
lore
#0 lore raw

Hello Kishon Vijay Abraham I,

The patch 47ff3de911a7: "PCI: dra7xx: Add TI DRA7xx PCIe driver" from Jul 22, 2014, leads to the following static checker warning:

	drivers/pci/host/pci-dra7xx.c:180 dra7xx_pcie_init_irq_domain()
	warn: passing zero to 'PTR_ERR'

drivers/pci/host/pci-dra7xx.c
172 static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp) 173 {

   174          struct device *dev = pp->dev;
   175          struct device_node *node = dev->of_node;
   176          struct device_node *pcie_intc_node =  of_get_next_child(node, NULL);
   177  
   178          if (!pcie_intc_node) {
                     ^^^^^^^^^^^^^^
   179                  dev_err(dev, "No PCIe Intc node found\n");
   180                  return PTR_ERR(pcie_intc_node);
                                       ^^^^^^^^^^^^^^
   181          }
   182  
   183          pp->irq_domain = irq_domain_add_linear(pcie_intc_node, 4,
   184                                                 &intx_domain_ops, pp);
   185          if (!pp->irq_domain) {
   186                  dev_err(dev, "Failed to get a INTx IRQ domain\n");
   187                  return PTR_ERR(pp->irq_domain);
                                       ^^^^^^^^^^^^^^

Again.

188 }
189
190 return 0;

regards,
dan carpenter