[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230828101757.9724-1-aboutphysycs@gmail.com>
Date: Mon, 28 Aug 2023 13:17:57 +0300
From: Andrei Coardos <aboutphysycs@...il.com>
To: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-riscv@...ts.infradead.org
Cc: alex@...uggie.ro, herbert@...dor.apana.org.au, olivia@...enic.com,
daire.mcnamara@...rochip.com, conor.dooley@...rochip.com,
Andrei Coardos <aboutphysycs@...il.com>
Subject: [PATCH] char: hw_random: mpfs-rng: removed unneeded call to platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Signed-off-by: Andrei Coardos <aboutphysycs@...il.com>
---
drivers/char/hw_random/mpfs-rng.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/hw_random/mpfs-rng.c b/drivers/char/hw_random/mpfs-rng.c
index c6972734ae62..0994024daa70 100644
--- a/drivers/char/hw_random/mpfs-rng.c
+++ b/drivers/char/hw_random/mpfs-rng.c
@@ -79,8 +79,6 @@ static int mpfs_rng_probe(struct platform_device *pdev)
rng_priv->rng.read = mpfs_rng_read;
rng_priv->rng.name = pdev->name;
- platform_set_drvdata(pdev, rng_priv);
-
ret = devm_hwrng_register(&pdev->dev, &rng_priv->rng);
if (ret)
return dev_err_probe(&pdev->dev, ret, "Failed to register MPFS hwrng\n");
--
2.34.1
Powered by blists - more mailing lists