mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: sst: Fix runtime PM imbalance in sst_power_control
@ 2020-05-25  7:06 Dinghao Liu
  2020-05-26 13:25 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 3+ messages in thread
From: Dinghao Liu @ 2020-05-25  7:06 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Thomas Gleixner,
	Allison Randal, Greg Kroah-Hartman, Alexios Zavras, alsa-devel,
	linux-kernel

When sst_load_fw() returns an error code, a pairing runtime
PM usage counter decrement is needed to keep the counter
balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 sound/soc/intel/atom/sst/sst_drv_interface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/atom/sst/sst_drv_interface.c b/sound/soc/intel/atom/sst/sst_drv_interface.c
index 762495385d5c..3897985b254f 100644
--- a/sound/soc/intel/atom/sst/sst_drv_interface.c
+++ b/sound/soc/intel/atom/sst/sst_drv_interface.c
@@ -150,6 +150,7 @@ static int sst_power_control(struct device *dev, bool state)
 		if ((ctx->sst_state == SST_RESET) && (usage_count == 1)) {
 			ret = sst_load_fw(ctx);
 			if (ret) {
+				pm_runtime_put_sync(dev);
 				dev_err(dev, "FW download fail %d\n", ret);
 				sst_set_fw_state_locked(ctx, SST_RESET);
 				ret = sst_pm_runtime_put(ctx);
-- 
2.17.1


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

end of thread, other threads:[~2020-05-27  1:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  7:06 [PATCH] ASoC: Intel: sst: Fix runtime PM imbalance in sst_power_control Dinghao Liu
2020-05-26 13:25 ` Pierre-Louis Bossart
2020-05-27  1:07   ` dinghao.liu

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

Powered by JetHome