diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-09-09 08:11:50 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-16 19:41:52 -0400 |
commit | f9dd0ce67db80079484f154a27581e30c28e6938 (patch) | |
tree | ab71d71042bff74c749f5079265be79c19621213 | |
parent | 8961def56845593f22ce85474e428f6e4892fdd3 (diff) |
PCI: xilinx: Fix xilinx_pcie_assign_msi() return value test
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>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Srikanth Thokala <sthokal@xilinx.com>
-rw-r--r-- | drivers/pci/host/pcie-xilinx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index 44f894493dca..ccc496b33a97 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, | |||
359 | phys_addr_t msg_addr; | 359 | phys_addr_t msg_addr; |
360 | 360 | ||
361 | hwirq = xilinx_pcie_assign_msi(port); | 361 | hwirq = xilinx_pcie_assign_msi(port); |
362 | if (irq < 0) | 362 | if (hwirq < 0) |
363 | return irq; | 363 | return hwirq; |
364 | 364 | ||
365 | irq = irq_create_mapping(port->irq_domain, hwirq); | 365 | irq = irq_create_mapping(port->irq_domain, hwirq); |
366 | if (!irq) | 366 | if (!irq) |