hwrng: ingenic - remove dead assignments
authorMartin Kaiser <martin@kaiser.cx>
Mon, 10 Jul 2023 20:27:29 +0000 (22:27 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Jul 2023 01:59:36 +0000 (13:59 +1200)
Don't assign a value to ret if we're about to return from the probe
function and ret's value is not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/ingenic-trng.c

index 64286cb..bfec28c 100644 (file)
@@ -86,13 +86,11 @@ static int ingenic_trng_probe(struct platform_device *pdev)
        trng->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(trng->base)) {
                pr_err("%s: Failed to map DTRNG registers\n", __func__);
-               ret = PTR_ERR(trng->base);
                return PTR_ERR(trng->base);
        }
 
        trng->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(trng->clk)) {
-               ret = PTR_ERR(trng->clk);
                pr_crit("%s: Cannot get DTRNG clock\n", __func__);
                return PTR_ERR(trng->clk);
        }