Commit 1730ef62 authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown

ASoC: Intel: boards: sof-wm8804: add check for PLL setting

Currently the return from snd_soc_dai_set_pll is not checking for
failure, this is the only driver in the kernel that ignores this,
so it probably should be added for sake of completeness.  Fix this
by adding an error return check.

Addresses-Coverity: ("Unchecked return value")
Fixes: f139546f ("ASoC: Intel: boards: sof-wm8804: support for Hifiberry Digiplus boards")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210226185653.1071321-1-colin.king@canonical.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ff568785
......@@ -124,7 +124,11 @@ static int sof_wm8804_hw_params(struct snd_pcm_substream *substream,
}
snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
ret = snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
if (ret < 0) {
dev_err(rtd->card->dev, "Failed to set WM8804 PLL\n");
return ret;
}
ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
sysclk, SND_SOC_CLOCK_OUT);
......
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