hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init()
Add clk_disable_unprepare() in the error path in stm32_rng_init().
Fixes: 6b85a7e141 ("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>
This commit is contained in:
committed by
Herbert Xu
parent
040791041b
commit
429fec81d1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user