From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] pinctrl: wpcm450: Correct the fwnode_irq_get() return value check
Date: Tue, 27 Sep 2022 20:33:13 +0200 [thread overview]
Message-ID: <YzNB6eg/caVtPEHA@probook> (raw)
In-Reply-To: <20220927175509.15695-1-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
On Tue, Sep 27, 2022 at 08:55:09PM +0300, Andy Shevchenko wrote:
> fwnode_irq_get() can return zero to indicate IRQ mapping errors.
> Handle this case by skipping the interrupt resource.
>
> Fixes: a1d1e0e3d80a ("pinctrl: nuvoton: Add driver for WPCM450")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: amended commit message (Jonathan)
> drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> index 0dbeb91f0bf2..8193b92da403 100644
> --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> @@ -1081,10 +1081,13 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
>
> girq->num_parents = 0;
> for (i = 0; i < WPCM450_NUM_GPIO_IRQS; i++) {
> - int irq = fwnode_irq_get(child, i);
> + int irq;
>
> + irq = fwnode_irq_get(child, i);
> if (irq < 0)
> break;
> + if (!irq)
> + continue;
>
> girq->parents[i] = irq;
> girq->num_parents++;
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org,
"Linus Walleij" <linus.walleij@linaro.org>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Subject: Re: [PATCH v2 1/1] pinctrl: wpcm450: Correct the fwnode_irq_get() return value check
Date: Tue, 27 Sep 2022 20:33:13 +0200 [thread overview]
Message-ID: <YzNB6eg/caVtPEHA@probook> (raw)
In-Reply-To: <20220927175509.15695-1-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
On Tue, Sep 27, 2022 at 08:55:09PM +0300, Andy Shevchenko wrote:
> fwnode_irq_get() can return zero to indicate IRQ mapping errors.
> Handle this case by skipping the interrupt resource.
>
> Fixes: a1d1e0e3d80a ("pinctrl: nuvoton: Add driver for WPCM450")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: amended commit message (Jonathan)
> drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> index 0dbeb91f0bf2..8193b92da403 100644
> --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> @@ -1081,10 +1081,13 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
>
> girq->num_parents = 0;
> for (i = 0; i < WPCM450_NUM_GPIO_IRQS; i++) {
> - int irq = fwnode_irq_get(child, i);
> + int irq;
>
> + irq = fwnode_irq_get(child, i);
> if (irq < 0)
> break;
> + if (!irq)
> + continue;
>
> girq->parents[i] = irq;
> girq->num_parents++;
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-09-27 18:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 17:55 [PATCH v2 1/1] pinctrl: wpcm450: Correct the fwnode_irq_get() return value check Andy Shevchenko
2022-09-27 18:33 ` Jonathan Neuschäfer [this message]
2022-09-27 18:33 ` Jonathan Neuschäfer
2022-10-04 7:41 ` Linus Walleij
2022-10-04 7:41 ` Linus Walleij
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=YzNB6eg/caVtPEHA@probook \
--to=j.neuschaefer@gmx.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
/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.