crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe()
[ Upstream commit7bcceb4c98] 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:b359f034c8("crypto: omap-sham - Convert to use pm_runtime API") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Acked-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
75c7b5d6b5
commit
09814c669d
1 changed files with 1 additions and 1 deletions
|
|
@ -2130,7 +2130,7 @@ static int omap_sham_probe(struct platform_device *pdev)
|
|||
pm_runtime_enable(dev);
|
||||
pm_runtime_irq_safe(dev);
|
||||
|
||||
err = pm_runtime_get_sync(dev);
|
||||
err = pm_runtime_resume_and_get(dev);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "failed to get sync: %d\n", err);
|
||||
goto err_pm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue