Re: [patch] PCI: xilinx: testing wrong variable in setup irq function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 09, 2014 at 03:11:50PM +0300, Dan Carpenter wrote:
> 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@xxxxxxxxxx>

Applied with Srikanth's ack to pci/host-xilinx for v3.18, thanks.

> 
> 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux