mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] treewide: fix incomplete error-handling in img_i2s_in_probe.
@ 2020-05-25  5:50 wu000273
  2020-05-26  9:43 ` Mark Brown
  2020-05-26 16:45 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: wu000273 @ 2020-05-25  5:50 UTC (permalink / raw)
  To: lgirdwood
  Cc: broonie, perex, tiwai, p.zabel, tglx, lsa-devel, linux-kernel,
	kjlu, wu000273

From: Qiushi Wu <wu000273@umn.edu>

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>
---
 sound/soc/img/img-i2s-in.c | 1 +
 1 file changed, 1 insertion(+)

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;
 		}
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-26 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  5:50 [PATCH] treewide: fix incomplete error-handling in img_i2s_in_probe wu000273
2020-05-26  9:43 ` Mark Brown
2020-05-26 16:45 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®