summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-10-18 16:14:49 +0800
committerMark Brown <broonie@kernel.org>2019-10-18 18:12:13 +0100
commit1092b09708882e3c216f0b9c02e606b3c0942c5b (patch)
tree062500152a50be8fd6f911b324ab7e05112ed360 /sound
parent349959a9c767cee04b7362fda230cc2433246fd9 (diff)
ASoC: tlv320aic32x4: add a check for devm_clk_get
aic32x4_set_dai_sysclk misses a check for devm_clk_get and may miss the failure. Add a check to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Link: https://lore.kernel.org/r/20191018081448.8486-1-hslester96@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 68165de1c8de..b4e9a6c73f90 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -573,6 +573,9 @@ static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
struct clk *pll;
pll = devm_clk_get(component->dev, "pll");
+ if (IS_ERR(pll))
+ return PTR_ERR(pll);
+
mclk = clk_get_parent(pll);
return clk_set_rate(mclk, freq);