Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yang Yingliang and committed by
Herbert Xu
429fec81 04079104

+1
+1
drivers/char/hw_random/stm32-rng.c
··· 325 325 (!(reg & RNG_CR_CONDRST)), 326 326 10, 50000); 327 327 if (err) { 328 + clk_disable_unprepare(priv->clk); 328 329 dev_err((struct device *)priv->rng.priv, 329 330 "%s: timeout %x!\n", __func__, reg); 330 331 return -EINVAL;