Skip to contentSkip to conversation

PCI: xilinx-nwl: fix an error code in nwl_pcie_init_irq_domain()

PATCH New Dan Carpenter 1 participant 1 message Mar 15, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: xilinx-nwl: fix an error code in nwl_pcie_init_irq_domain()

Returning PTR_ERR(legacy_intc_node) is zero which is success but we want to return a negative error code.

Fixes 4337ea1d4b10 ('PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller')
drivers/pci/host/pcie-xilinx-nwl.c +1 -1
index 7a2dc2e..5139e64 100644
@@ -525,7 +525,7 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie)
 	legacy_intc_node = of_get_next_child(node, NULL);
 	if (!legacy_intc_node) {
 		dev_err(pcie->dev, "No legacy intc node found\n");
-		return PTR_ERR(legacy_intc_node);
+		return -EINVAL;
 	}
 
 	pcie->legacy_irq_domain = irq_domain_add_linear(legacy_intc_node,