提交 30fb0343 编写于 作者: Y Yuan Can 提交者: Herbert Xu

crypto: ccree - Add missing clk_disable_unprepare() in cc_pm_resume()

Add clk_disable_unprepare() on error path in cc_pm_resume().
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYuan Can <yuancan@huawei.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 01ce31de
...@@ -41,6 +41,7 @@ static int cc_pm_resume(struct device *dev) ...@@ -41,6 +41,7 @@ static int cc_pm_resume(struct device *dev)
/* wait for Cryptocell reset completion */ /* wait for Cryptocell reset completion */
if (!cc_wait_for_reset_completion(drvdata)) { if (!cc_wait_for_reset_completion(drvdata)) {
dev_err(dev, "Cryptocell reset not completed"); dev_err(dev, "Cryptocell reset not completed");
clk_disable_unprepare(drvdata->clk);
return -EBUSY; return -EBUSY;
} }
...@@ -48,6 +49,7 @@ static int cc_pm_resume(struct device *dev) ...@@ -48,6 +49,7 @@ static int cc_pm_resume(struct device *dev)
rc = init_cc_regs(drvdata); rc = init_cc_regs(drvdata);
if (rc) { if (rc) {
dev_err(dev, "init_cc_regs (%x)\n", rc); dev_err(dev, "init_cc_regs (%x)\n", rc);
clk_disable_unprepare(drvdata->clk);
return rc; return rc;
} }
/* check if tee fips error occurred during power down */ /* check if tee fips error occurred during power down */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册