From: Dinghao Liu <dinghao.liu@zju.edu.cn>
To: dinghao.liu@zju.edu.cn, kjlu@umn.edu
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Jie Yang <yang.jie@linux.intel.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Thomas Gleixner <tglx@linutronix.de>,
Allison Randal <allison@lohutok.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexios Zavras <alexios.zavras@intel.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: Intel: sst: Fix runtime PM imbalance in sst_power_control
Date: Mon, 25 May 2020 15:06:59 +0800 [thread overview]
Message-ID: <20200525070701.3888-1-dinghao.liu@zju.edu.cn> (raw)
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
next reply other threads:[~2020-05-25 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 7:06 Dinghao Liu [this message]
2020-05-26 13:25 ` [PATCH] ASoC: Intel: sst: Fix runtime PM imbalance in sst_power_control Pierre-Louis Bossart
2020-05-27 1:07 ` dinghao.liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200525070701.3888-1-dinghao.liu@zju.edu.cn \
--to=dinghao.liu@zju.edu.cn \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kjlu@umn.edu \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.com \
--cc=yang.jie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).