X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_timer.c;h=2c89c04f29163766dde1c6b9f6f7a296310343f3;hb=02cabab4a8a7ef2d51189d5dda84516d36662910;hp=d94ed16d21ea9dac3e93d776b116f8c25b8def6c;hpb=877211f5e1b1196179ba1290e8e1a3dc00427c55;p=linux-2.6-omap-h63xx.git diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index d94ed16d21e..2c89c04f291 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c @@ -1,6 +1,6 @@ /* * Digital Audio (PCM) abstract layer - * Copyright (c) by Jaroslav Kysela + * Copyright (c) by Jaroslav Kysela * * * This program is free software; you can redistribute it and/or modify @@ -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;