summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <blum@kernel.org>2026-10-02 16:35:53 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2026-10-08 18:48:07 +1100
commit378bbe625babd6860583f574d0697008170ab51f (patch)
tree8ae97e426d7844c46e75966f74c2fa7aa64ca4d5
parentaa2c03d3726c9e93554d7071d55d2f4a35e2481a (diff)
hwrng: stm32 - drop redundant initializations
The variables are reassigned before their initial values are read - drop the redundant initializations. Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/char/hw_random/stm32-rng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index bcec6f0b9bb1..e44e6e623808 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -156,7 +156,7 @@ end:
*/
static int stm32_rng_conceal_seed_error_sw_reset(struct stm32_rng_private *priv)
{
- unsigned int i = 0;
+ unsigned int i;
u32 sr = readl_relaxed(priv->base + RNG_SR);
writel_relaxed(sr & ~RNG_SR_SEIS, priv->base + RNG_SR);
@@ -187,7 +187,7 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
{
struct stm32_rng_private *priv = container_of(rng, struct stm32_rng_private, rng);
unsigned int i = 0;
- int retval = 0, err = 0;
+ int retval, err;
u32 sr;
retval = pm_runtime_resume_and_get(priv->dev);
@@ -264,7 +264,7 @@ static uint stm32_rng_clock_freq_restrain(struct hwrng *rng)
{
struct stm32_rng_private *priv =
container_of(rng, struct stm32_rng_private, rng);
- unsigned long clock_rate = 0;
+ unsigned long clock_rate;
uint clock_div = 0;
clock_rate = clk_get_rate(priv->clk_bulk[0].clk);