aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-05 12:39:58 -0500
committerMark Brown <broonie@linaro.org>2013-11-06 05:26:59 -0500
commit4c8d620ac9e3aea0a0c2edf36851b59b44bd12f2 (patch)
tree0355b27fb276925782697d95e3fb322b855dc368 /sound/soc
parent246e884b82305c5669a892c04e67864f4e7c10d5 (diff)
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8904.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 4dfa8dceeabf..c173ab3cd18a 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -658,7 +658,8 @@ SOC_SINGLE_TLV("EQ5 Volume", WM8904_EQ6, 0, 24, 0, eq_tlv),
658static int cp_event(struct snd_soc_dapm_widget *w, 658static int cp_event(struct snd_soc_dapm_widget *w,
659 struct snd_kcontrol *kcontrol, int event) 659 struct snd_kcontrol *kcontrol, int event)
660{ 660{
661 BUG_ON(event != SND_SOC_DAPM_POST_PMU); 661 if (WARN_ON(event != SND_SOC_DAPM_POST_PMU))
662 return -EINVAL;
662 663
663 /* Maximum startup time */ 664 /* Maximum startup time */
664 udelay(500); 665 udelay(500);