summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm9713.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-05 18:39:59 +0100
committerMark Brown <broonie@linaro.org>2013-11-06 10:27:03 +0000
commitfb2e3e70193f6757e536dfdecf21be2e6ee308d4 (patch)
treee212a2b12d26dc3bd8afadfed5ea5862df15a910 /sound/soc/codecs/wm9713.c
parent4c8d620ac9e3aea0a0c2edf36851b59b44bd12f2 (diff)
downloadop-kernel-dev-fb2e3e70193f6757e536dfdecf21be2e6ee308d4.zip
op-kernel-dev-fb2e3e70193f6757e536dfdecf21be2e6ee308d4.tar.gz
ASoC: wm9713: 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/codecs/wm9713.c')
-rw-r--r--sound/soc/codecs/wm9713.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index a53e175..acea892 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -221,7 +221,8 @@ static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
struct snd_soc_codec *codec = w->codec;
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. */
status = ac97_read(codec, AC97_EXTENDED_MID) | 0x1000;
OpenPOWER on IntegriCloud