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

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Takashi Iwai 2013-11-05 18:39:58 +01:00 committed by Mark Brown
parent 246e884b82
commit 4c8d620ac9

View File

@ -658,7 +658,8 @@ SOC_SINGLE_TLV("EQ5 Volume", WM8904_EQ6, 0, 24, 0, eq_tlv),
static int cp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
BUG_ON(event != SND_SOC_DAPM_POST_PMU);
if (WARN_ON(event != SND_SOC_DAPM_POST_PMU))
return -EINVAL;
/* Maximum startup time */
udelay(500);