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>
This commit is contained in:
Dan Carpenter 2014-09-09 15:11:50 +03:00 committed by Bjorn Helgaas
parent 8961def568
commit f9dd0ce67d
1 changed files with 2 additions and 2 deletions

View File

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