All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: lee@kernel.org, andriy.shevchenko@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mfd: intel-lpss: Fix IRQ check
Date: Wed, 1 Nov 2023 09:03:10 +0200	[thread overview]
Message-ID: <20231101070310.GF17433@black.fi.intel.com> (raw)
In-Reply-To: <20231101062643.507983-1-nichen@iscas.ac.cn>

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@iscas.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.

  reply	other threads:[~2023-11-01  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01  6:26 [PATCH v2] mfd: intel-lpss: Fix IRQ check Chen Ni
2023-11-01  7:03 ` Mika Westerberg [this message]
2023-11-01  9:38   ` Andy Shevchenko
2023-11-01  9:42     ` Andy Shevchenko
2023-11-01 10:47     ` Mika Westerberg
2023-11-02 12:38       ` Andy Shevchenko
2023-11-03  6:41         ` Mika Westerberg
2023-11-03 14:58           ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231101070310.GF17433@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.