lkml.org 
[lkml]   [2023]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mfd: intel-lpss: Fix IRQ check
On Wed, Nov 01, 2023 at 09:03:10AM +0200, Mika Westerberg wrote:
> On Wed, Nov 01, 2023 at 06:26:43AM +0000, Chen Ni wrote:
> > platform_get_irq() returns a negative error code to indicating an
> > error. So in intel_lpss_probe() the unset / erroneous IRQ should be
> > returned as is.
> >
> > Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")

> There is no need for Fixes tag here.

I said that already in v1 :-)

...

> > - if (!info || !info->mem || info->irq <= 0)
> > + if (!info || !info->mem)
>
> This check (info->irq <= 0) covers both "invalid" interrupt numbers
> (that's the negative errno and 0 as no interrupt) so I don't see how
> this change makes it any better and the changelog does not clarify it
> either.

It makes sense. The IRQ here may not be 0. We should actually fix
the PCI code to guarantee that (platform_get_irq() guarantees that
in platform driver).

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-11-01 10:41    [W:2.513 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site