Skip to content

Commit

Permalink
ASoC: codecs: rtq9128: Fix PM_RUNTIME usage
Browse files Browse the repository at this point in the history
[ Upstream commit 3504041 ]

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 <[email protected]>
Link: https://msgid.link/r/bebd9e2bed9e0528a7fd9c528d785da02caf4f1a.1703813842.git.cy_huang@richtek.com
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
ChiYuan Huang authored and gregkh committed Feb 5, 2024
1 parent c331709 commit 2c272ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/codecs/rtq9128.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2c272ff

Please sign in to comment.