Re: [PATCH 2/5] PCI: v3-semi: Fix platform_get_irq() error handling

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

 



On Sun, Oct 15, 2017 at 12:07 AM, Fabio Estevam <festevam@xxxxxxxxx> wrote:

> When platform_get_irq() fails we should propagate the real error value
> instead of always returning -ENODEV.
>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>

OK

>         irq = platform_get_irq(pdev, 0);
> -       if (irq <= 0) {
> +       if (irq < 0) {

So 0 is NO_IRQ and not valid these days. See:
https://lwn.net/Articles/470820/

>                 dev_err(dev, "unable to obtain PCIv3 error IRQ\n");
> -               return -ENODEV;
> +               return irq;

But this is right, if irq < 0.

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