Commit 7bcceb4c authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Herbert Xu

crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe()

omap_sham_probe() calls pm_runtime_get_sync() and calls
pm_runtime_put_sync() latter to put usage_counter. However,
pm_runtime_get_sync() will increment usage_counter even it failed. Fix
it by replacing it with pm_runtime_resume_and_get() to keep usage
counter balanced.

Fixes: b359f034 ("crypto: omap-sham - Convert to use pm_runtime API")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Acked-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c390c452
...@@ -2114,7 +2114,7 @@ static int omap_sham_probe(struct platform_device *pdev) ...@@ -2114,7 +2114,7 @@ static int omap_sham_probe(struct platform_device *pdev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
err = pm_runtime_get_sync(dev); err = pm_runtime_resume_and_get(dev);
if (err < 0) { if (err < 0) {
dev_err(dev, "failed to get sync: %d\n", err); dev_err(dev, "failed to get sync: %d\n", err);
goto err_pm; goto err_pm;
......
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