On Tue, May 9, 2023 at 6:31 PM Shenwei Wang <shenwei.wang@xxxxxxx> wrote: > > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > > Sent: Tuesday, May 9, 2023 4:12 AM > > On Mon, May 8, 2023 at 10:46 PM Shenwei Wang <shenwei.wang@xxxxxxx> > > wrote: ... > > > if (irq_count > 1) { > > > - port->irq_high = platform_get_irq(pdev, 1); > > > + port->irq_high = platform_get_irq_optional(pdev, 1); > > > if (port->irq_high < 0) > > > port->irq_high = 0; > > > > I would rather do > > > > err = platform_get_irq_optional(pdev, 1); > > if (err >= 0) > > Should be "if (err > 0)", right? As the platform_get_irq_optional() return non-zero > IRQ number on success. Either way will work, but your proposal is better. > > port->irq_high = err; > > > > > } > > > > And looking into the code the above piece makes more sense after asking for > > the first (mandatory) IRQ. -- With Best Regards, Andy Shevchenko