Commit 25bf943e authored by Qiushi Wu's avatar Qiushi Wu Committed by Mark Brown

ASoC: fix incomplete error-handling in img_i2s_in_probe.

Function "pm_runtime_get_sync()" is not handled by "pm_runtime_put()"
if "PTR_ERR(rst) == -EPROBE_DEFER". Fix this issue by adding
"pm_runtime_put()" into this error path.

Fixes: f65bb92c ("ASoC: img-i2s-in: Add runtime PM")
Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200525055011.31925-1-wu000273@umn.eduSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c553d290
...@@ -482,6 +482,7 @@ static int img_i2s_in_probe(struct platform_device *pdev) ...@@ -482,6 +482,7 @@ static int img_i2s_in_probe(struct platform_device *pdev)
if (IS_ERR(rst)) { if (IS_ERR(rst)) {
if (PTR_ERR(rst) == -EPROBE_DEFER) { if (PTR_ERR(rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER; ret = -EPROBE_DEFER;
pm_runtime_put(&pdev->dev);
goto err_suspend; goto err_suspend;
} }
......
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