summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2022-02-21 10:59:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-20 10:08:13 +0300
commit85f3f6b540088aa4698dd3260b38a4a0528a0679 (patch)
treed857634174387ec95d5597c07da8bae9239e7059
parent0f009684e368ef3f10b039c5620da0d75f32c472 (diff)
downloadlinux-85f3f6b540088aa4698dd3260b38a4a0528a0679.tar.xz
hwrng: atmel - disable trng on failure path
[ 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>
-rw-r--r--drivers/char/hw_random/atmel-rng.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 661c82cde0f2..92a8960ceba5 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -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;
}