aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiasheng Jiang <[email protected]>2022-03-01 16:17:17 +0800
committerMark Brown <[email protected]>2022-03-02 13:45:21 +0000
commit2ecf362d220317debf5da376e0390e9f7a3f7b29 (patch)
tree711de1ebfdffceb270a8cd3406ecbe085d4939ad
parent8dd55245836119ee3636543b6c2597efd78e643d (diff)
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: d0ba4c014934 ("ASoC: mxs-saif: set a base clock rate for EXTMASTER mode work") Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/mxs/mxs-saif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 6a2d24d48964..879c1221a809 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -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)