[PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()

From: Thorsten Blum

Date: Thu Oct 01 2026 - 17:26:34 EST


Reuse clock_rate and avoid calling clk_get_rate() again. Remove the
extra space before the colon while at it.

Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
drivers/char/hw_random/stm32-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index d3fc910f674a..319944d92b82 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -277,7 +277,7 @@ static uint stm32_rng_clock_freq_restrain(struct hwrng *rng)
while ((clock_rate >> clock_div) > priv->data->max_clock_rate)
clock_div++;

- pr_debug("RNG clk rate : %lu\n", clk_get_rate(priv->clk_bulk[0].clk) >> clock_div);
+ pr_debug("RNG clk rate: %lu\n", clock_rate >> clock_div);

return clock_div;
}