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

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

 



Hi Dan,

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> Sent: Tuesday, September 09, 2014 5:42 PM
> To: Bjorn Helgaas; Srikanth Thokala
> Cc: Michal Simek; Grant Likely; Rob Herring; Srikanth Thokala; Arnd Bergmann;
> linux-pci@xxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx
> Subject: [patch] PCI: xilinx: testing wrong variable in setup irq function
>
> 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>
>
> 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;

It is a typo from my end, thanks for sending this patch.
Really thanks for helping to improve this.

Acked-by: Srikanth Thokala <sthokal@xxxxxxxxxx>

- Srikanth

>
>       irq = irq_create_mapping(port->irq_domain, hwirq);
>       if (!irq)


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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