aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-pcm.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-06-16 17:04:18 -0500
committerMark Brown <broonie@kernel.org>2022-06-27 13:17:53 +0100
commit7213170a9515109322f75c08b5268d8e9cdad8e4 (patch)
tree277fc31d61815d0749061308dd89b53daba3fb9d /sound/soc/intel/skylake/skl-pcm.c
parentASoC: Intel: catpt: use pm_runtime_resume_and_get() (diff)
downloadlinux-dev-7213170a9515109322f75c08b5268d8e9cdad8e4.tar.xz
linux-dev-7213170a9515109322f75c08b5268d8e9cdad8e4.zip
ASoC: Intel: skylake: skl-pcm: use pm_runtime_resume_and_get()
The current code does not check for errors and does not release the reference on errors. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220616220427.136036-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 55f310e91b55..9d72ebd812af 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -1380,7 +1380,10 @@ static int skl_platform_soc_probe(struct snd_soc_component *component)
const struct skl_dsp_ops *ops;
int ret;
- pm_runtime_get_sync(component->dev);
+ ret = pm_runtime_resume_and_get(component->dev);
+ if (ret < 0 && ret != -EACCES)
+ return ret;
+
if (bus->ppcap) {
skl->component = component;