diff mbox series

[4/8] ASoC: SOF: control: update test for pm_runtime_get_sync()

Message ID 20200917105633.2579047-5-kai.vehmanen@linux.intel.com
State New
Headers show
Series ASoC: SOF: small fixes for 5.10 | expand

Commit Message

Kai Vehmanen Sept. 17, 2020, 10:56 a.m. UTC
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

We need to avoid reporting an error for -EACCESS when pm_runtime is
not enabled.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index d5e2966cafac..5419c93badd2 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -367,7 +367,7 @@  int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
 	int err;
 
 	ret = pm_runtime_get_sync(scomp->dev);
-	if (ret < 0) {
+	if (ret < 0 && ret != -EACCES) {
 		dev_err_ratelimited(scomp->dev, "error: bytes_ext get failed to resume %d\n", ret);
 		pm_runtime_put_noidle(scomp->dev);
 		return ret;