summaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_timer.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-13 11:05:51 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-13 11:05:51 +0200
commitaccba5f3965d6a9d1bf7c1e1a7995d17e9d521b6 (patch)
tree8fb40782e79472ed882ff2098d4dd295557278ee /sound/core/pcm_timer.c
parent6852fd9b86d05063c6ef49d2e12e061cc7f6a105 (diff)
parent4480f15b3306f43bbb0310d461142b4e897ca45b (diff)
Merge branch 'linus' into oprofile-v2
Conflicts: arch/x86/kernel/apic_32.c arch/x86/oprofile/nmi_int.c include/linux/pci_ids.h
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)
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;