summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rtq9128.c
diff options
context:
space:
mode:
authorChiYuan Huang <cy_huang@richtek.com>2023-12-29 09:46:01 +0800
committerMark Brown <broonie@kernel.org>2024-01-05 15:20:46 +0000
commit35040410372ca27a33cec8382d42c90b6b6c99f6 (patch)
tree0a686c4f9349521c43d51f4371173c193b5d4158 /sound/soc/codecs/rtq9128.c
parent67508b874844b80ac49f70b78d67036c28b9fe7e (diff)
downloadlinux-stable-35040410372ca27a33cec8382d42c90b6b6c99f6.tar.gz
linux-stable-35040410372ca27a33cec8382d42c90b6b6c99f6.tar.bz2
linux-stable-35040410372ca27a33cec8382d42c90b6b6c99f6.zip
ASoC: codecs: rtq9128: Fix PM_RUNTIME usage
If 'pm_runtime_resume_and_get' is used, must check the return value to prevent the active count not matched problem. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://msgid.link/r/bebd9e2bed9e0528a7fd9c528d785da02caf4f1a.1703813842.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rtq9128.c')
-rw-r--r--sound/soc/codecs/rtq9128.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c
index c22b047115cc..bda64f9eeb62 100644
--- a/sound/soc/codecs/rtq9128.c
+++ b/sound/soc/codecs/rtq9128.c
@@ -391,7 +391,11 @@ static int rtq9128_component_probe(struct snd_soc_component *comp)
unsigned int val;
int i, ret;
- pm_runtime_resume_and_get(comp->dev);
+ ret = pm_runtime_resume_and_get(comp->dev);
+ if (ret < 0) {
+ dev_err(comp->dev, "Failed to resume device (%d)\n", ret);
+ return ret;
+ }
val = snd_soc_component_read(comp, RTQ9128_REG_EFUSE_DATA);