aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-06 05:07:17 -0500
committerMark Brown <broonie@linaro.org>2013-11-07 14:55:20 -0500
commitd8e9a54414b92efd87e32c7320c894e7d0595158 (patch)
treee718432e3225ea7796a49555f62227c024481765 /sound/soc/codecs
parent69134367c34aa35e895f10911ed3587ba270dcb0 (diff)
ASoC: wm8996: 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>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8996.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 46fe83d2b224..d666de03704a 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -608,7 +608,7 @@ static int bg_event(struct snd_soc_dapm_widget *w,
608 wm8996_bg_disable(codec); 608 wm8996_bg_disable(codec);
609 break; 609 break;
610 default: 610 default:
611 BUG(); 611 WARN(1, "Invalid event %d\n", event);
612 ret = -EINVAL; 612 ret = -EINVAL;
613 } 613 }
614 614
@@ -625,7 +625,7 @@ static int cp_event(struct snd_soc_dapm_widget *w,
625 msleep(5); 625 msleep(5);
626 break; 626 break;
627 default: 627 default:
628 BUG(); 628 WARN(1, "Invalid event %d\n", event);
629 ret = -EINVAL; 629 ret = -EINVAL;
630 } 630 }
631 631
@@ -646,7 +646,7 @@ static int rmv_short_event(struct snd_soc_dapm_widget *w,
646 wm8996->hpout_pending |= w->shift; 646 wm8996->hpout_pending |= w->shift;
647 break; 647 break;
648 default: 648 default:
649 BUG(); 649 WARN(1, "Invalid event %d\n", event);
650 return -EINVAL; 650 return -EINVAL;
651 } 651 }
652 652
@@ -767,7 +767,7 @@ static int dcs_start(struct snd_soc_dapm_widget *w,
767 wm8996->dcs_pending |= 1 << w->shift; 767 wm8996->dcs_pending |= 1 << w->shift;
768 break; 768 break;
769 default: 769 default:
770 BUG(); 770 WARN(1, "Invalid event %d\n", event);
771 return -EINVAL; 771 return -EINVAL;
772 } 772 }
773 773
@@ -1656,7 +1656,7 @@ static int wm8996_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1656 lrclk_rx_reg = WM8996_AIF2_RX_LRCLK_2; 1656 lrclk_rx_reg = WM8996_AIF2_RX_LRCLK_2;
1657 break; 1657 break;
1658 default: 1658 default:
1659 BUG(); 1659 WARN(1, "Invalid dai id %d\n", dai->id);
1660 return -EINVAL; 1660 return -EINVAL;
1661 } 1661 }
1662 1662
@@ -1768,7 +1768,7 @@ static int wm8996_hw_params(struct snd_pcm_substream *substream,
1768 dsp_shift = WM8996_DSP2_DIV_SHIFT; 1768 dsp_shift = WM8996_DSP2_DIV_SHIFT;
1769 break; 1769 break;
1770 default: 1770 default:
1771 BUG(); 1771 WARN(1, "Invalid dai id %d\n", dai->id);
1772 return -EINVAL; 1772 return -EINVAL;
1773 } 1773 }
1774 1774