mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
		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: Mon, 06 Jul 2026 12:31:22 +0200	[thread overview]
Message-ID: <814f72ae1f039b6ae13599c11f9916f4eeaa634e.camel@pengutronix.de> (raw)
In-Reply-To: <20260705172353.119031-2-krzysztof.kozlowski@oss.qualcomm.com>

On So, 2026-07-05 at 19:23 +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(-)
> 
> 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;
>  		}
>  

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

  reply	other threads:[~2026-07-06 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05 17:23 Krzysztof Kozlowski
2026-07-06 10:31 ` Philipp Zabel [this message]
2026-07-08 16:52 ` Mathieu Poirier

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=814f72ae1f039b6ae13599c11f9916f4eeaa634e.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=andersson@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.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 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®