summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2022-03-01 17:06:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-15 14:14:45 +0200
commite104975d166697611261d7486c78ea32d121cd70 (patch)
tree96e0285b3837b429a76cb58be8a581c0639e435a /sound
parent559706b0a2bb4c1d8cc50f7ba1d5c69b424a8af2 (diff)
downloadlinux-stable-e104975d166697611261d7486c78ea32d121cd70.tar.gz
linux-stable-e104975d166697611261d7486c78ea32d121cd70.tar.bz2
linux-stable-e104975d166697611261d7486c78ea32d121cd70.zip
ASoC: atmel_ssc_dai: Handle errors for clk_enable
[ Upstream commit f9e2ca0640e59d19af0ff285ee5591ed39069b09 ] As the potential failure of the clk_enable(), it should be better to check it and return error if fals. Fixes: cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and shutdown") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Link: https://lore.kernel.org/r/20220301090637.3776558-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index d3b69682d9c2..7272f00222fd 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -296,7 +296,10 @@ static int atmel_ssc_startup(struct snd_pcm_substream *substream,
/* Enable PMC peripheral clock for this SSC */
pr_debug("atmel_ssc_dai: Starting clock\n");
- clk_enable(ssc_p->ssc->clk);
+ ret = clk_enable(ssc_p->ssc->clk);
+ if (ret)
+ return ret;
+
ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk);
/* Reset the SSC unless initialized to keep it in a clean state */