Commit ff810720 authored by Zhang Qilong's avatar Zhang Qilong Committed by Herbert Xu

crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe

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: f7b2b5dd ("crypto: omap-aes - add error check for pm_runtime_get_sync")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 1dc44035
...@@ -1138,7 +1138,7 @@ static int omap_aes_probe(struct platform_device *pdev) ...@@ -1138,7 +1138,7 @@ static int omap_aes_probe(struct platform_device *pdev)
if (err < 0) { if (err < 0) {
dev_err(dev, "%s: failed to get_sync(%d)\n", dev_err(dev, "%s: failed to get_sync(%d)\n",
__func__, err); __func__, err);
goto err_res; goto err_pm_disable;
} }
omap_aes_dma_stop(dd); omap_aes_dma_stop(dd);
...@@ -1247,6 +1247,7 @@ static int omap_aes_probe(struct platform_device *pdev) ...@@ -1247,6 +1247,7 @@ static int omap_aes_probe(struct platform_device *pdev)
omap_aes_dma_cleanup(dd); omap_aes_dma_cleanup(dd);
err_irq: err_irq:
tasklet_kill(&dd->done_task); tasklet_kill(&dd->done_task);
err_pm_disable:
pm_runtime_disable(dev); pm_runtime_disable(dev);
err_res: err_res:
dd = NULL; dd = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment