Re: [PATCH v1] hwrng: ks-sa: Fix runtime PM cleanup on registration failure
From: Herbert Xu
Date: Sun Jul 12 2026 - 23:45:09 EST
On Thu, Jul 02, 2026 at 07:39:21PM -0400, Yuho Choi wrote:
> ks_sa_rng_probe() enables runtime PM and resumes the device before
> registering the hwrng. If devm_hwrng_register() fails, probe returns
> without dropping the runtime PM usage count or disabling runtime PM.
>
> Unwind the runtime PM state on the registration failure path, matching
> the cleanup done by remove().
>
> Fixes: e9009fb227fa ("hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding")
> Signed-off-by: Yuho Choi <dbgh9129@xxxxxxxxx>
> ---
> drivers/char/hw_random/ks-sa-rng.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
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