* [PATCH] hwrng: cctrng - drop redundant initializations
@ 2026-09-30 20:01 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-09-30 20:01 UTC (permalink / raw)
To: Hadar Gat, Olivia Mackall, Herbert Xu
Cc: Thorsten Blum, linux-crypto, linux-kernel
The variables are reassigned before their initial values are read - drop
the redundant initializations.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/char/hw_random/cctrng.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 51290ea345c3..829b9b86dc96 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -91,7 +91,7 @@ static int cc_trng_pm_get(struct device *dev)
static void cc_trng_pm_put_suspend(struct device *dev)
{
- int rc = 0;
+ int rc;
rc = pm_runtime_put_autosuspend(dev);
if (rc)
@@ -208,7 +208,7 @@ static int cctrng_read(struct hwrng *rng, void *data, size_t max, bool wait)
struct cctrng_drvdata *drvdata = (struct cctrng_drvdata *)rng->priv;
struct device *dev = &(drvdata->pdev->dev);
u32 *buf = (u32 *)drvdata->circ.buf;
- size_t copied = 0;
+ size_t copied;
size_t cnt_w;
size_t size;
size_t left;
@@ -309,8 +309,8 @@ static void cc_trng_hw_trigger(struct cctrng_drvdata *drvdata)
static void cc_trng_compwork_handler(struct work_struct *w)
{
- u32 isr = 0;
- u32 ehr_valid = 0;
+ u32 isr;
+ u32 ehr_valid;
struct cctrng_drvdata *drvdata =
container_of(w, struct cctrng_drvdata, compwork);
struct device *dev = &(drvdata->pdev->dev);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-30 20:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 20:01 [PATCH] hwrng: cctrng - drop redundant initializations Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®