diff mbox series

[-next,2/2] hwrng: cctrng - Add missing clk_disable_unprepare in cctrng_resume

Message ID 20240803064923.337696-3-cuigaosheng1@huawei.com
State Accepted
Commit 4b7acc85de14ee8a2236f54445dc635d47eceac0
Headers show
Series Add missing clk_disable_unprepare | expand

Commit Message

Gaosheng Cui Aug. 3, 2024, 6:49 a.m. UTC
Add the missing clk_disable_unprepare() before return in
cctrng_resume().

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/char/hw_random/cctrng.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index c0d2f824769f..4c50efc46483 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -622,6 +622,7 @@  static int __maybe_unused cctrng_resume(struct device *dev)
 	/* wait for Cryptocell reset completion */
 	if (!cctrng_wait_for_reset_completion(drvdata)) {
 		dev_err(dev, "Cryptocell reset not completed");
+		clk_disable_unprepare(drvdata->clk);
 		return -EBUSY;
 	}