From 2fbde5f4981be8bf0db5b565a1c67515af65bc50 Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Fri, 2 Oct 2026 16:48:38 +0200 Subject: [PATCH] hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe() The resource pointer is unused - use devm_platform_ioremap_resource() and remove the unnecessary local variable. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu --- drivers/char/hw_random/stm32-rng.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index e44e6e623808..739263eb56ba 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -528,14 +528,13 @@ static int stm32_rng_probe(struct platform_device *ofdev) struct device *dev = &ofdev->dev; struct device_node *np = ofdev->dev.of_node; struct stm32_rng_private *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - priv->base = devm_platform_get_and_ioremap_resource(ofdev, 0, &res); + priv->base = devm_platform_ioremap_resource(ofdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);