Re: [PATCH] hwrng: starfive: propagate clock and reset errors
From: Herbert Xu
Date: Wed Sep 23 2026 - 05:08:21 EST
On Sun, Aug 30, 2026 at 09:17:53PM +0800, Pengpeng Hou wrote:
> The StarFive TRNG probe and resume paths ignore failures from their clock
> and reset operations. That lets the driver register or resume while its
> hardware access prerequisites were not established.
>
> Check each transition, unwind only the previously enabled clock on failure,
> and propagate the error to the probe or PM core.
>
> Fixes: c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC")
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---
> drivers/char/hw_random/jh7110-trng.c | 39 +++++++++++++++++++++++++++---------
> 1 file changed, 29 insertions(+), 10 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt