Skip to content

Commit

Permalink
ASoC: mxs-saif: Handle errors for clk_enable
Browse files Browse the repository at this point in the history
As the potential failure of the clk_enable(),
it should be better to check it, like mxs_saif_trigger().

Fixes: d0ba4c0 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220301081717.3727190-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
JiangJias authored and broonie committed Mar 2, 2022
1 parent 8dd5524 commit 2ecf362
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* logic.
*/
clk_enable(saif->clk);
ret = clk_enable(saif->clk);
if (ret)
return ret;

ret = clk_set_rate(saif->clk, 24000000);
clk_disable(saif->clk);
if (ret)
Expand Down

0 comments on commit 2ecf362

Please sign in to comment.