Skip to content

Commit

Permalink
ASoC: Work around warnings from some build environments
Browse files Browse the repository at this point in the history
BUG() should be marked as not returning but for at least some
configurations (including some widely deployed compilers) that's either
not happening or being forgotten by the compiler.  Add some extra return
statements to the affected paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Dec 10, 2008
1 parent f73f2a6 commit 1e297a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ static int wm8903_output_event(struct snd_soc_dapm_widget *w,
break;
default:
BUG();
return -EINVAL; /* Spurious warning from some compilers */
}

switch (w->shift) {
Expand All @@ -403,6 +404,7 @@ static int wm8903_output_event(struct snd_soc_dapm_widget *w,
break;
default:
BUG();
return -EINVAL; /* Spurious warning from some compilers */
}

if (event & SND_SOC_DAPM_PRE_PMU) {
Expand Down

0 comments on commit 1e297a1

Please sign in to comment.