Skip to content

Commit

Permalink
crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe
Browse files Browse the repository at this point in the history
[ Upstream commit ff81072 ]

The pm_runtime_enable will increase power disable depth.
Thus a pairing decrement is needed on the error handling
path to keep it balanced according to context.

Fixes: f7b2b5d ("crypto: omap-aes - add error check for pm_runtime_get_sync")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhang Qilong authored and gregkh committed Dec 30, 2020
1 parent c549355 commit 70e19fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/crypto/omap-aes.c
Expand Up @@ -1157,7 +1157,7 @@ static int omap_aes_probe(struct platform_device *pdev)
if (err < 0) {
dev_err(dev, "%s: failed to get_sync(%d)\n",
__func__, err);
goto err_res;
goto err_pm_disable;
}

omap_aes_dma_stop(dd);
Expand Down Expand Up @@ -1267,6 +1267,7 @@ static int omap_aes_probe(struct platform_device *pdev)
omap_aes_dma_cleanup(dd);
err_irq:
tasklet_kill(&dd->done_task);
err_pm_disable:
pm_runtime_disable(dev);
err_res:
dd = NULL;
Expand Down

0 comments on commit 70e19fc

Please sign in to comment.