summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorYuan Can <yuancan@huawei.com>2022-07-04 16:01:45 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 11:43:20 +0300
commit30fb034361ff1b9bfc569b2d8d66b544ea3eb18f (patch)
treebf144b365054473a55542d7f4e7df14f378d32c2 /drivers/crypto
parent01ce31de7043e17b0d7d47f5e038f067db618113 (diff)
downloadlinux-30fb034361ff1b9bfc569b2d8d66b544ea3eb18f.tar.xz
crypto: ccree - Add missing clk_disable_unprepare() in cc_pm_resume()
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/ccree/cc_pm.c2
1 files changed, 2 insertions, 0 deletions
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 */