Re: [PATCH 4/5] PCI: tango: Fix platform_get_irq() error handling

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

 



On Mon, Oct 16, 2017 at 11:09 AM, Marc Gonzalez
<marc_gonzalez@xxxxxxxxxxxxxxxx> wrote:

> I don't think this patch is correct.
>
> AFAIU, on all but legacy platforms, when platform_get_irq() returns 0,
> it is to signal an error condition.
>
> Marc Z pointed out this discussion:
> http://yarchive.net/comp/linux/zero.html

Same comment as I had, more or less.

> I suppose it would be slightly nicer to write:
>
>         virq = platform_get_irq(pdev, 1);
>         if (virq <= 0)
>                 return virq ? virq : -ENODEV;

This looks good to me.

Yours,
Linus Walleij



[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