diff mbox series

[3/8] ASoC: SOF: debug: update test for pm_runtime_get_sync()

Message ID 20200917105633.2579047-4-kai.vehmanen@linux.intel.com (mailing list archive)
State Accepted
Commit 7db6db9d1a4a7864cd2557e983e06f3adf788c6a
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/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index 8e15f105d1d5..9419a99bab53 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -405,7 +405,7 @@  static ssize_t sof_dfsentry_write(struct file *file, const char __user *buffer,
 	}
 
 	ret = pm_runtime_get_sync(sdev->dev);
-	if (ret < 0) {
+	if (ret < 0 && ret != -EACCES) {
 		dev_err_ratelimited(sdev->dev,
 				    "error: debugfs write failed to resume %d\n",
 				    ret);