* [patch] PCI: xilinx-nwl: fix an error code in nwl_pcie_init_irq_domain()
@ 2016-03-15 7:12 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-03-15 7:12 UTC (permalink / raw)
To: Bjorn Helgaas, Bharat Kumar Gogada
Cc: Michal Simek, Sören Brinkmann, Marc Zyngier, Rob Herring,
Ravi Kiran Gummaluri, linux-pci, linux-kernel, kernel-janitors
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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c
index 7a2dc2e..5139e64 100644
--- a/drivers/pci/host/pcie-xilinx-nwl.c
+++ b/drivers/pci/host/pcie-xilinx-nwl.c
@@ -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,
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-15 7:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15 7:12 [patch] PCI: xilinx-nwl: fix an error code in nwl_pcie_init_irq_domain() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).