lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160315071248.GG13560@mwanda>
Date:	Tue, 15 Mar 2016 10:12:48 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Bharat Kumar Gogada <bharat.kumar.gogada@...inx.com>
Cc:	Michal Simek <michal.simek@...inx.com>,
	Sören Brinkmann <soren.brinkmann@...inx.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Rob Herring <robh@...nel.org>,
	Ravi Kiran Gummaluri <rgummal@...inx.com>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [patch] 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')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ