[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231101070310.GF17433@black.fi.intel.com>
Date: Wed, 1 Nov 2023 09:03:10 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Chen Ni <nichen@...as.ac.cn>
Cc: lee@...nel.org, andriy.shevchenko@...ux.intel.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mfd: intel-lpss: Fix IRQ check
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.
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
> Changelog:
>
> v1 -> v2:
> 1. Update commit message
> 2. Fix IRQ check in intel_lpcc_probe()
> ---
> drivers/mfd/intel-lpss.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
> index 9591b354072a..4c9d0222751a 100644
> --- a/drivers/mfd/intel-lpss.c
> +++ b/drivers/mfd/intel-lpss.c
> @@ -378,9 +378,12 @@ int intel_lpss_probe(struct device *dev,
> struct intel_lpss *lpss;
> int ret;
>
> - 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.
Powered by blists - more mailing lists