The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] hwrng: cctrng - simplify cctrng_probe()
@ 2026-10-06 20:27 Thorsten Blum
  2026-10-15  9:55 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-10-06 20:27 UTC (permalink / raw)
  To: Hadar Gat, Olivia Mackall, Herbert Xu
  Cc: Thorsten Blum, linux-crypto, linux-kernel

Handle the error directly and drop the goto statement.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/char/hw_random/cctrng.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index a6925211c3b5..43bf99741bdf 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -539,7 +539,8 @@ static int cctrng_probe(struct platform_device *pdev)
 	rc = devm_hwrng_register(dev, &drvdata->rng);
 	if (rc) {
 		dev_err(dev, "Could not register hwrng device.\n");
-		goto post_pm_err;
+		cc_trng_pm_fini(drvdata);
+		return rc;
 	}
 
 	/* trigger HW to start generate data */
@@ -552,11 +553,6 @@ static int cctrng_probe(struct platform_device *pdev)
 	dev_info(dev, "ARM cctrng device initialized\n");
 
 	return 0;
-
-post_pm_err:
-	cc_trng_pm_fini(drvdata);
-
-	return rc;
 }
 
 static void cctrng_remove(struct platform_device *pdev)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwrng: cctrng - simplify cctrng_probe()
  2026-10-06 20:27 [PATCH] hwrng: cctrng - simplify cctrng_probe() Thorsten Blum
@ 2026-10-15  9:55 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2026-10-15  9:55 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: Hadar Gat, Olivia Mackall, linux-crypto, linux-kernel

On Tue, Oct 06, 2026 at 10:27:34PM +0200, Thorsten Blum wrote:
> Handle the error directly and drop the goto statement.
> 
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
>  drivers/char/hw_random/cctrng.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-15  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 20:27 [PATCH] hwrng: cctrng - simplify cctrng_probe() Thorsten Blum
2026-10-15  9:55 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox