diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-12-01 16:20:48 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-12-08 11:59:44 +0800 |
commit | 429fec81d12266e6402868672de8c68bf4d8db13 (patch) | |
tree | 2aef972d83db30a7c26196575f4ea1fe3b74ec28 /drivers/char/hw_random | |
parent | 040791041b68fbc06511834b225c5974daa5088b (diff) |
hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init()
Add clk_disable_unprepare() in the error path in stm32_rng_init().
Fixes: 6b85a7e141cb ("hwrng: stm32 - implement STM32MP13x support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/stm32-rng.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 41e1dbea5d2e..efd6edcd7066 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -325,6 +325,7 @@ static int stm32_rng_init(struct hwrng *rng) (!(reg & RNG_CR_CONDRST)), 10, 50000); if (err) { + clk_disable_unprepare(priv->clk); dev_err((struct device *)priv->rng.priv, "%s: timeout %x!\n", __func__, reg); return -EINVAL; |