Skip to content

Commit 3504041

Browse files
ChiYuan Huangbroonie
authored andcommitted
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>
1 parent 67508b8 commit 3504041

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

sound/soc/codecs/rtq9128.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ static int rtq9128_component_probe(struct snd_soc_component *comp)
391391
unsigned int val;
392392
int i, ret;
393393

394-
pm_runtime_resume_and_get(comp->dev);
394+
ret = pm_runtime_resume_and_get(comp->dev);
395+
if (ret < 0) {
396+
dev_err(comp->dev, "Failed to resume device (%d)\n", ret);
397+
return ret;
398+
}
395399

396400
val = snd_soc_component_read(comp, RTQ9128_REG_EFUSE_DATA);
397401

0 commit comments

Comments
 (0)