Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9dd0ce6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Bjorn Helgaas
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarSrikanth Thokala <sthokal@xilinx.com>
parent 8961def5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)