Skip to content

Commit

Permalink
ASoC: Intel: cht_bsw_rt5672: check return value
Browse files Browse the repository at this point in the history
Set codec sysclk could fail and return error, add
error check for it.

Signed-off-by: Chao Song <[email protected]>
  • Loading branch information
Chao Song authored and bardliao committed Nov 13, 2023
1 parent 453fdbb commit 39e7681
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/intel/boards/cht_bsw_rt5672.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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);
Expand Down

0 comments on commit 39e7681

Please sign in to comment.