projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c8d620
)
ASoC: wm9713: Use WARN_ON() instead of BUG_ON()
author
Takashi Iwai
<tiwai@suse.de>
Tue, 5 Nov 2013 17:39:59 +0000
(18:39 +0100)
committer
Mark Brown
<broonie@linaro.org>
Wed, 6 Nov 2013 10:27:03 +0000
(10:27 +0000)
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>
sound/soc/codecs/wm9713.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/codecs/wm9713.c
b/sound/soc/codecs/wm9713.c
index a53e175c015ad54d60ff6ce085680613ee19d28d..acea8927905bd733b35be0e8af439a4c8ab364bd 100644
(file)
--- 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;