diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-16 08:26:32 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 10:51:22 -0400 |
commit | 2a3988f6d2c5be9d02463097775d1c66a8290527 (patch) | |
tree | cdad29008b9276f934ed91526eabbfef7ce8da87 | |
parent | ea045ee4d381428ec9c056ff5848bc619d84986a (diff) |
[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>
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 3 |
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) | |||
3059 | unsigned int dds_value = hdsp->dds_value; | 3059 | unsigned int dds_value = hdsp->dds_value; |
3060 | int system_sample_rate = hdsp->system_sample_rate; | 3060 | int system_sample_rate = hdsp->system_sample_rate; |
3061 | 3061 | ||
3062 | if (!dds_value) | ||
3063 | return 0; | ||
3064 | |||
3062 | n = DDS_NUMERATOR; | 3065 | n = DDS_NUMERATOR; |
3063 | /* | 3066 | /* |
3064 | * dds_value = n / rate | 3067 | * dds_value = n / rate |