Commit 65b2df10 authored by Chao Song's avatar Chao Song Committed by Mark Brown

ASoC: Intel: cht_bsw_rt5672: check return value

Set codec sysclk could fail and return error, add
error check for it.
Signed-off-by: default avatarChao Song <chao.song@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231127152654.28204-5-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 007d9a63
......@@ -93,8 +93,12 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
* when codec is runtime suspended. Codec needs clock for jack
* detection and button press.
*/
snd_soc_dai_set_sysclk(codec_dai, RT5670_SCLK_S_RCCLK,
48000 * 512, SND_SOC_CLOCK_IN);
ret = snd_soc_dai_set_sysclk(codec_dai, RT5670_SCLK_S_RCCLK,
48000 * 512, SND_SOC_CLOCK_IN);
if (ret < 0) {
dev_err(card->dev, "failed to set codec sysclk: %d\n", ret);
return ret;
}
if (ctx->mclk)
clk_disable_unprepare(ctx->mclk);
......
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