mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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>
This commit is contained in:
parent
01ce31de70
commit
30fb034361
1 changed files with 2 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue