aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-16 14:26:32 +0200
committerJaroslav Kysela <perex@perex.cz>2007-10-16 16:51:22 +0200
commit2a3988f6d2c5be9d02463097775d1c66a8290527 (patch)
treecdad29008b9276f934ed91526eabbfef7ce8da87 /sound/pci/rme9652
parent[ALSA] usb-audio - Fix double comment (diff)
downloadlinux-dev-2a3988f6d2c5be9d02463097775d1c66a8290527.tar.xz
linux-dev-2a3988f6d2c5be9d02463097775d1c66a8290527.zip
[ALSA] hdsp - Fix zero division
Fix zero-division bug in the calculation dds offset. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 2411f0b396b4..ff26a3672d40 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -3059,6 +3059,9 @@ static int hdsp_dds_offset(struct hdsp *hdsp)
unsigned int dds_value = hdsp->dds_value;
int system_sample_rate = hdsp->system_sample_rate;
+ if (!dds_value)
+ return 0;
+
n = DDS_NUMERATOR;
/*
* dds_value = n / rate