Skip to content

Commit 7bcceb4

Browse files
Shang XiaoJingherbertx
authored andcommitted
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: b359f03 ("crypto: omap-sham - Convert to use pm_runtime API") Signed-off-by: Shang XiaoJing <[email protected]> Acked-by: Mark Greer <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent c390c45 commit 7bcceb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/omap-sham.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ static int omap_sham_probe(struct platform_device *pdev)
21142114

21152115
pm_runtime_enable(dev);
21162116

2117-
err = pm_runtime_get_sync(dev);
2117+
err = pm_runtime_resume_and_get(dev);
21182118
if (err < 0) {
21192119
dev_err(dev, "failed to get sync: %d\n", err);
21202120
goto err_pm;

0 commit comments

Comments
 (0)