Commit 2ecf362d authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Mark Brown

ASoC: mxs-saif: Handle errors for clk_enable

As the potential failure of the clk_enable(),
it should be better to check it, like mxs_saif_trigger().

Fixes: d0ba4c01 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301081717.3727190-1-jiasheng@iscas.ac.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8dd55245
...@@ -455,7 +455,10 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream, ...@@ -455,7 +455,10 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
* basic clock which should be fast enough for the internal * basic clock which should be fast enough for the internal
* logic. * logic.
*/ */
clk_enable(saif->clk); ret = clk_enable(saif->clk);
if (ret)
return ret;
ret = clk_set_rate(saif->clk, 24000000); ret = clk_set_rate(saif->clk, 24000000);
clk_disable(saif->clk); clk_disable(saif->clk);
if (ret) if (ret)
......
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