X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_timer.c;h=2c89c04f29163766dde1c6b9f6f7a296310343f3;hb=57f8f7b60db6f1ed2c6918ab9230c4623a9dbe37;hp=23aa9a27e2158f8cd2173b6e66d12887a4432453;hpb=fe537c0ee86b27fbe0690a7869815da80f492dbd;p=linux-2.6-omap-h63xx.git diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index 23aa9a27e21..2c89c04f291 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c @@ -19,7 +19,6 @@ * */ -#include #include #include #include @@ -52,12 +51,14 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) mult = 1000000000; rate = runtime->rate; - snd_assert(rate != 0, return); + if (snd_BUG_ON(!rate)) + return; l = gcd(mult, rate); mult /= l; rate /= l; fsize = runtime->period_size; - snd_assert(fsize != 0, return); + if (snd_BUG_ON(!fsize)) + return; l = gcd(rate, fsize); rate /= l; fsize /= l;