summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/max98088.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 11:43:41 +0100
committerMark Brown <broonie@linaro.org>2013-11-08 11:43:41 +0100
commit108145a60675ebc0e42e7964ee6666096bbf86ce (patch)
tree19266ab0500d7bb188eb53634d484054d59473d2 /sound/soc/codecs/max98088.c
parentMerge remote-tracking branch 'asoc/topic/twl6040' into asoc-next (diff)
parentASoC: dapm: Use WARN_ON() instead of BUG_ON() (diff)
downloadlinux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.xz
linux-108145a60675ebc0e42e7964ee6666096bbf86ce.zip
Merge remote-tracking branch 'asoc/topic/warn' into asoc-next
Diffstat (limited to 'sound/soc/codecs/max98088.c')
-rw-r--r--sound/soc/codecs/max98088.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 66ceee22fdad..53d7dab4e054 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -568,8 +568,9 @@ static void m98088_eq_band(struct snd_soc_codec *codec, unsigned int dai,
unsigned int eq_reg;
unsigned int i;
- BUG_ON(band > 4);
- BUG_ON(dai > 1);
+ if (WARN_ON(band > 4) ||
+ WARN_ON(dai > 1))
+ return;
/* Load the base register address */
eq_reg = dai ? M98088_REG_84_DAI2_EQ_BASE : M98088_REG_52_DAI1_EQ_BASE;
@@ -909,7 +910,8 @@ static int max98088_line_pga(struct snd_soc_dapm_widget *w,
struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
u8 *state;
- BUG_ON(!((channel == 1) || (channel == 2)));
+ if (WARN_ON(!(channel == 1 || channel == 2)))
+ return -EINVAL;
switch (line) {
case LINE_INA: