summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2022-02-21 09:59:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-15 14:14:43 +0200
commit733a694a82d3f558b7813120e2df669f7b64a0db (patch)
treeecfb39433fc7fdd76b04ceede403966dcb9c14e0
parente24d5fc9bd0e04941fee0083f99dd1ebc451c780 (diff)
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 433426242b87..40e6951ea078 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -96,6 +96,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
err_register:
clk_disable_unprepare(trng->clk);
+ atmel_trng_disable(trng);
return ret;
}