aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-06 05:07:16 -0500
committerMark Brown <broonie@linaro.org>2013-11-07 14:55:20 -0500
commit69134367c34aa35e895f10911ed3587ba270dcb0 (patch)
treeacd9e7d219709f24ba3d27e1f1e2398591da7e45
parenta845d59de67d29ac28c39684dfffd252c9d37215 (diff)
ASoC: wm8962: Replace BUG() with WARN()
BUG() used in the driver is just to spit the stack trace on buggy points, not really needed to stop the whole operation. For that purpose, it'd be more convenient to use WARN() instead with more error information. Cc: patches@opensource.wolfsonmicro.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/wm8962.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 11d80f3b6137..22e42e788649 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1845,7 +1845,7 @@ static int cp_event(struct snd_soc_dapm_widget *w,
1845 break; 1845 break;
1846 1846
1847 default: 1847 default:
1848 BUG(); 1848 WARN(1, "Invalid event %d\n", event);
1849 return -EINVAL; 1849 return -EINVAL;
1850 } 1850 }
1851 1851
@@ -1937,7 +1937,7 @@ static int hp_event(struct snd_soc_dapm_widget *w,
1937 break; 1937 break;
1938 1938
1939 default: 1939 default:
1940 BUG(); 1940 WARN(1, "Invalid event %d\n", event);
1941 return -EINVAL; 1941 return -EINVAL;
1942 1942
1943 } 1943 }
@@ -1966,7 +1966,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
1966 reg = WM8962_SPKOUTL_VOLUME; 1966 reg = WM8962_SPKOUTL_VOLUME;
1967 break; 1967 break;
1968 default: 1968 default:
1969 BUG(); 1969 WARN(1, "Invalid shift %d\n", w->shift);
1970 return -EINVAL; 1970 return -EINVAL;
1971 } 1971 }
1972 1972
@@ -1974,7 +1974,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
1974 case SND_SOC_DAPM_POST_PMU: 1974 case SND_SOC_DAPM_POST_PMU:
1975 return snd_soc_write(codec, reg, snd_soc_read(codec, reg)); 1975 return snd_soc_write(codec, reg, snd_soc_read(codec, reg));
1976 default: 1976 default:
1977 BUG(); 1977 WARN(1, "Invalid event %d\n", event);
1978 return -EINVAL; 1978 return -EINVAL;
1979 } 1979 }
1980} 1980}
@@ -1997,7 +1997,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w,
1997 break; 1997 break;
1998 1998
1999 default: 1999 default:
2000 BUG(); 2000 WARN(1, "Invalid event %d\n", event);
2001 return -EINVAL; 2001 return -EINVAL;
2002 } 2002 }
2003 2003