Skip to content

Commit

Permalink
hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init()
Browse files Browse the repository at this point in the history
Add clk_disable_unprepare() in the error path in stm32_rng_init().

Fixes: 6b85a7e ("hwrng: stm32 - implement STM32MP13x support")
Signed-off-by: Yang Yingliang <[email protected]>
Reviewed-by: Gatien Chevallier <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Yang Yingliang authored and herbertx committed Dec 8, 2023
1 parent 0407910 commit 429fec8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/hw_random/stm32-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 429fec8

Please sign in to comment.