diff mbox series

[v2,2/7] hwrng: atmel - disable trng on failure path

Message ID 20220221075928.563806-3-claudiu.beznea@microchip.com
State Accepted
Commit a223ea9f89ab960eb254ba78429efd42eaf845eb
Headers show
Series [v2,1/7] hwrng: atmel - add wait for ready support on read | expand

Commit Message

Claudiu Beznea Feb. 21, 2022, 7:59 a.m. UTC
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>
---
 drivers/char/hw_random/atmel-rng.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 1a4874668c04..b7ef951927fb 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -131,6 +131,7 @@  static int atmel_trng_probe(struct platform_device *pdev)
 
 err_register:
 	clk_disable_unprepare(trng->clk);
+	atmel_trng_disable(trng);
 	return ret;
 }