From: Dave Gerlach <d-gerlach@ti.com>
To: Miaoqian Lin <linmq006@gmail.com>, Nishanth Menon <nm@ti.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Tony Lindgren <tony@atomide.com>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe
Date: Wed, 2 Feb 2022 13:20:02 -0600 [thread overview]
Message-ID: <9848466d-6307-8f74-87b6-e3f050651c8d@ti.com> (raw)
In-Reply-To: <20220114062840.16620-1-linmq006@gmail.com>
Hi,
On 1/14/22 00:28, Miaoqian Lin wrote:
> platform_get_irq() returns negative error number instead 0 on failure.
> And the doc of platform_get_irq() provides a usage example:
>
> int irq = platform_get_irq(pdev, 0);
> if (irq < 0)
> return irq;
>
> Fix the check of return value to catch errors correctly.
>
Looks good to me.
Acked-by: Dave Gerlach <d-gerlach@ti.com>
> Fixes: cdd5de500b2c ("soc: ti: Add wkup_m3_ipc driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/soc/ti/wkup_m3_ipc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c
> index 72386bd393fe..2f03ced0f411 100644
> --- a/drivers/soc/ti/wkup_m3_ipc.c
> +++ b/drivers/soc/ti/wkup_m3_ipc.c
> @@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev)
> return PTR_ERR(m3_ipc->ipc_mem_base);
>
> irq = platform_get_irq(pdev, 0);
> - if (!irq) {
> + if (irq < 0) {
> dev_err(&pdev->dev, "no irq resource\n");
> - return -ENXIO;
> + return irq;
> }
>
> ret = devm_request_irq(dev, irq, wkup_m3_txev_handler,
next prev parent reply other threads:[~2022-02-02 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 6:28 Miaoqian Lin
2022-02-02 19:20 ` Dave Gerlach [this message]
2022-02-02 19:51 ` Nishanth Menon
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=9848466d-6307-8f74-87b6-e3f050651c8d@ti.com \
--to=d-gerlach@ti.com \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=ssantosh@kernel.org \
--cc=tony@atomide.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®