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>
This commit is contained in:
parent
349959a9c7
commit
1092b09708
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue