lkml.org 
[lkml]   [2023]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: intel-lpss: Add check for platform_get_irq
On Tue, Oct 31, 2023 at 06:36:42AM +0000, Chen Ni wrote:
> The platform_get_irq() might be failed and return a negative result.
> So there should have an error handling code.

NAK.

Have you checked the implementation of intel_lpcc_probe()?

> Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")

It does not fix anything, except maybe an error code.
Also it misses PCI counterpart.

...

That said, I would expect that in intel_lpss_probe() the unset / erroneous IRQ
(which actually shouldn't be checked against 0 at all) should be returned as is.


i.e.

if (!info || !info->mem || info->irq <= 0)
return -EINVAL;

be converted to

if (!info || !info->mem)
return -EINVAL;

if (info->irq < 0)
return info->irq;

That kind of patch I will accept.

--
With Best Regards,
Andy Shevchenko


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