aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_timer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:09:09 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:35 -0400
commit7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf (patch)
tree51d86a4cb01cf5735b18c36ca62471f8c759a041 /sound/core/pcm_timer.c
parent5ef03460a6ffc1d3ee6b6f2abc6765d3e224cf89 (diff)
ALSA: Kill snd_assert() in sound/core/*
Kill snd_assert() in sound/core/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core/pcm_timer.c')
-rw-r--r--sound/core/pcm_timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index 033a024d153..2c89c04f291 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -51,12 +51,14 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
51 51
52 mult = 1000000000; 52 mult = 1000000000;
53 rate = runtime->rate; 53 rate = runtime->rate;
54 snd_assert(rate != 0, return); 54 if (snd_BUG_ON(!rate))
55 return;
55 l = gcd(mult, rate); 56 l = gcd(mult, rate);
56 mult /= l; 57 mult /= l;
57 rate /= l; 58 rate /= l;
58 fsize = runtime->period_size; 59 fsize = runtime->period_size;
59 snd_assert(fsize != 0, return); 60 if (snd_BUG_ON(!fsize))
61 return;
60 l = gcd(rate, fsize); 62 l = gcd(rate, fsize);
61 rate /= l; 63 rate /= l;
62 fsize /= l; 64 fsize /= l;