提交 fb2e3e70 编写于 作者: T Takashi Iwai 提交者: Mark Brown

ASoC: wm9713: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 4c8d620a
...@@ -221,7 +221,8 @@ static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w, ...@@ -221,7 +221,8 @@ static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
struct snd_soc_codec *codec = w->codec; struct snd_soc_codec *codec = w->codec;
u16 status, rate; u16 status, rate;
BUG_ON(event != SND_SOC_DAPM_PRE_PMD); if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD))
return -EINVAL;
/* Gracefully shut down the voice interface. */ /* Gracefully shut down the voice interface. */
status = ac97_read(codec, AC97_EXTENDED_MID) | 0x1000; status = ac97_read(codec, AC97_EXTENDED_MID) | 0x1000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册