* [PATCH] remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get
@ 2026-07-05 17:23 Krzysztof Kozlowski
2026-07-06 10:31 ` Philipp Zabel
2026-07-08 16:52 ` Mathieu Poirier
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-05 17:23 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Philipp Zabel, linux-remoteproc,
linux-kernel
Cc: Krzysztof Kozlowski
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;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get
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
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2026-07-06 10:31 UTC (permalink / raw)
To: Krzysztof Kozlowski, Bjorn Andersson, Mathieu Poirier,
linux-remoteproc, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: ti_k3_r5: Drop redundant NULL check on reset control get
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
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2026-07-08 16:52 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, Philipp Zabel, linux-remoteproc, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-08 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox