Message ID | 20231201082048.1975940-1-yangyingliang@huaweicloud.com |
---|---|
State | New |
Headers | show |
Series | hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init() | expand |
On Fri, Dec 01, 2023 at 04:20:48PM +0800, Yang Yingliang wrote: > From: Yang Yingliang <yangyingliang@huawei.com> > > 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> > --- > drivers/char/hw_random/stm32-rng.c | 1 + > 1 file changed, 1 insertion(+) Patch applied. Thanks.
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;