* [PATCH -next] crypto: ccree: Add missing clk_disable_unprepare() in cc_pm_resume()
@ 2022-07-04 13:01 Yuan Can
2022-07-15 8:47 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Yuan Can @ 2022-07-04 13:01 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-crypto, davem, herbert, gilad, yuancan
Add clk_disable_unprepare() on error path in cc_pm_resume().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
drivers/crypto/ccree/cc_pm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c
index d5421b0c6831..6124fbbbed94 100644
--- a/drivers/crypto/ccree/cc_pm.c
+++ b/drivers/crypto/ccree/cc_pm.c
@@ -41,6 +41,7 @@ static int cc_pm_resume(struct device *dev)
/* wait for Cryptocell reset completion */
if (!cc_wait_for_reset_completion(drvdata)) {
dev_err(dev, "Cryptocell reset not completed");
+ clk_disable_unprepare(drvdata->clk);
return -EBUSY;
}
@@ -48,6 +49,7 @@ static int cc_pm_resume(struct device *dev)
rc = init_cc_regs(drvdata);
if (rc) {
dev_err(dev, "init_cc_regs (%x)\n", rc);
+ clk_disable_unprepare(drvdata->clk);
return rc;
}
/* check if tee fips error occurred during power down */
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-15 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 13:01 [PATCH -next] crypto: ccree: Add missing clk_disable_unprepare() in cc_pm_resume() Yuan Can
2022-07-15 8:47 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®