From: Dan Carpenter Date: Tue, 9 Sep 2014 12:11:50 +0000 (+0300) Subject: PCI: xilinx: Fix xilinx_pcie_assign_msi() return value test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f9dd0ce67db80079484f154a27581e30c28e6938;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Bjorn Helgaas Acked-by: Srikanth Thokala --- 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, 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)