summaryrefslogtreecommitdiff
path: root/sound/soc/img
diff options
context:
space:
mode:
authorQiushi Wu <wu000273@umn.edu>2020-05-25 08:50:11 +0300
committerMark Brown <broonie@kernel.org>2020-05-26 19:20:23 +0300
commit25bf943e4e7b47282bd86ae7d39e039217ebb007 (patch)
treeb82cf4896476be2537ba206f87c0062d061f02d4 /sound/soc/img
parentc553d290577093553098a56c954e516950c35c59 (diff)
downloadlinux-25bf943e4e7b47282bd86ae7d39e039217ebb007.tar.xz
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: f65bb92ca12e ("ASoC: img-i2s-in: Add runtime PM") Signed-off-by: Qiushi Wu <wu000273@umn.edu> Link: https://lore.kernel.org/r/20200525055011.31925-1-wu000273@umn.edu Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/img')
-rw-r--r--sound/soc/img/img-i2s-in.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c
index a495d1050d49..e30b66b94bf6 100644
--- a/sound/soc/img/img-i2s-in.c
+++ b/sound/soc/img/img-i2s-in.c
@@ -482,6 +482,7 @@ static int img_i2s_in_probe(struct platform_device *pdev)
if (IS_ERR(rst)) {
if (PTR_ERR(rst) == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
+ pm_runtime_put(&pdev->dev);
goto err_suspend;
}