linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] PCI: xilinx: testing wrong variable in setup irq function
@ 2014-09-09 12:11 Dan Carpenter
  2014-09-09 12:31 ` Srikanth Thokala
  2014-09-16 23:47 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-09-09 12:11 UTC (permalink / raw)
  To: Bjorn Helgaas, Srikanth Thokala
  Cc: Michal Simek, Grant Likely, Rob Herring, Srikanth Thokala,
	Arnd Bergmann, linux-pci, kernel-janitors

We should be testing "hwirq" instead of "irq".  "irq" is unsigned so
it's never less than zero.  Also it's uninitialized.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index 44f8944..ccc496b 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip *chip,
 	phys_addr_t msg_addr;
 
 	hwirq = xilinx_pcie_assign_msi(port);
-	if (irq < 0)
-		return irq;
+	if (hwirq < 0)
+		return hwirq;
 
 	irq = irq_create_mapping(port->irq_domain, hwirq);
 	if (!irq)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-16 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 12:11 [patch] PCI: xilinx: testing wrong variable in setup irq function Dan Carpenter
2014-09-09 12:31 ` Srikanth Thokala
2014-09-16 23:47 ` Bjorn Helgaas

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).