diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-06-03 11:03:27 +0000 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-06-12 09:56:45 +0800 |
| commit | 8d13f7a8450206e3f820cdb26e33e91d181071b4 (patch) | |
| tree | d8d6b5f0b0b2d7f7ba19a9715390efd5aeda1522 /scripts/Makefile.thinlto | |
| parent | 70fd646ae5ddaae0a7fbbba94b500bde2e1211f0 (diff) | |
hwrng: jh7110 - fix refcount leak in starfive_trng_read()
The starfive_trng_read() function acquires a runtime PM reference
via pm_runtime_get_sync() but fails to release it on two error
paths. If starfive_trng_wait_idle() or starfive_trng_cmd() returns
an error, the function exits without calling
pm_runtime_put_sync_autosuspend(), leaving the runtime PM usage
counter permanently elevated and preventing the device from entering
runtime suspend.
Refactor the function to use a unified error path that calls
pm_runtime_put_sync_autosuspend() before returning.
Cc: stable@vger.kernel.org
Fixes: c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
