hwrng: atmel - disable trng on failure path
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Mon, 21 Feb 2022 07:59:23 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:08:13 +0000 (09:08 +0200)
[ Upstream commit a223ea9f89ab960eb254ba78429efd42eaf845eb ]

Call atmel_trng_disable() on failure path of probe.

Fixes: a1fa98d8116f ("hwrng: atmel - disable TRNG during suspend")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/hw_random/atmel-rng.c

index 661c82cde0f211c0ed5912eb81a814043adc31d9..92a8960ceba51f2d6f919855624e2668c55bef10 100644 (file)
@@ -95,6 +95,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
 
 err_register:
        clk_disable_unprepare(trng->clk);
+       atmel_trng_disable(trng);
        return ret;
 }