Commit 429fec81 authored by Yang Yingliang's avatar Yang Yingliang Committed by Herbert Xu

hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init()

Add clk_disable_unprepare() in the error path in stm32_rng_init().

Fixes: 6b85a7e1 ("hwrng: stm32 - implement STM32MP13x support")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarGatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 04079104
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment