Commit 1092b097 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Mark Brown

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: default avatarChuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191018081448.8486-1-hslester96@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 349959a9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment