From: Jakub Kicinski <kuba@kernel.org>
To: cgel.zte@gmail.com
Cc: krzysztof.kozlowski@linaro.org, davem@davemloft.net,
lv.ruyi@zte.com.cn, yashsri421@gmail.com, sameo@linux.intel.com,
cuissard@marvell.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] NFC: nfcmrvl: fix error check return value of irq_of_parse_and_map()
Date: Fri, 22 Apr 2022 16:09:31 -0700 [thread overview]
Message-ID: <20220422160931.6a4eca42@kernel.org> (raw)
In-Reply-To: <20220422084605.2775542-1-lv.ruyi@zte.com.cn>
On Fri, 22 Apr 2022 08:46:05 +0000 cgel.zte@gmail.com wrote:
> diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c
> index ceef81d93ac9..7dcc97707363 100644
> --- a/drivers/nfc/nfcmrvl/i2c.c
> +++ b/drivers/nfc/nfcmrvl/i2c.c
> @@ -167,7 +167,7 @@ static int nfcmrvl_i2c_parse_dt(struct device_node *node,
> pdata->irq_polarity = IRQF_TRIGGER_RISING;
>
> ret = irq_of_parse_and_map(node, 0);
> - if (ret < 0) {
> + if (!ret) {
> pr_err("Unable to get irq, error: %d\n", ret);
> return ret;
If ret is guaranteed to be 0 in this branch now, why print it,
and how is it okay to return it from this function on error?
The usual low quality patch from the CGEL team :/
next prev parent reply other threads:[~2022-04-22 23:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 8:46 [PATCH] NFC: nfcmrvl: fix error check return value of irq_of_parse_and_map() cgel.zte
2022-04-22 10:30 ` Krzysztof Kozlowski
2022-04-22 23:09 ` Jakub Kicinski [this message]
2022-04-24 2:57 ` [PATCH v2] " cgel.zte
2022-04-24 10:46 ` Krzysztof Kozlowski
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=20220422160931.6a4eca42@kernel.org \
--to=kuba@kernel.org \
--cc=cgel.zte@gmail.com \
--cc=cuissard@marvell.com \
--cc=davem@davemloft.net \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.ruyi@zte.com.cn \
--cc=netdev@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=yashsri421@gmail.com \
--cc=zealci@zte.com.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).