From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get
Date: Wed, 8 Jul 2026 10:52:27 -0600 [thread overview]
Message-ID: <ak6AS7NmN8Lw0v3b@p14s> (raw)
In-Reply-To: <20260705172353.119031-2-krzysztof.kozlowski@oss.qualcomm.com>
On Sun, Jul 05, 2026 at 07:23:54PM +0200, Krzysztof Kozlowski wrote:
> devm_reset_control_get_exclusive() does not return NULL (only valid
> clock or ERR pointer in case for non-optional get), so simplify the code
> to drop redundant IS_ERR_OR_NULL().
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/remoteproc/ti_k3_r5_remoteproc.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
Applied.
Thanks,
Mathieu
> diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c
> index 04f23295ffc1..b1d04d082e44 100644
> --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c
> @@ -1074,11 +1074,9 @@ static int k3_r5_cluster_rproc_init(struct platform_device *pdev)
> }
>
> kproc->reset = devm_reset_control_get_exclusive(cdev, NULL);
> - if (IS_ERR_OR_NULL(kproc->reset)) {
> - ret = PTR_ERR_OR_ZERO(kproc->reset);
> - if (!ret)
> - ret = -ENODEV;
> - dev_err_probe(cdev, ret, "failed to get reset handle\n");
> + if (IS_ERR(kproc->reset)) {
> + ret = dev_err_probe(cdev, PTR_ERR(kproc->reset),
> + "failed to get reset handle\n");
> goto out;
> }
>
> --
> 2.53.0
>
prev parent reply other threads:[~2026-07-08 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 17:23 [PATCH] remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get Krzysztof Kozlowski
2026-07-06 10:31 ` Philipp Zabel
2026-07-08 16:52 ` Mathieu Poirier [this message]
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=ak6AS7NmN8Lw0v3b@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
/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