projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea045ee
)
[ALSA] hdsp - Fix zero division
author
Takashi Iwai
<tiwai@suse.de>
Tue, 16 Oct 2007 12:26:32 +0000
(14:26 +0200)
committer
Jaroslav Kysela
<perex@perex.cz>
Tue, 16 Oct 2007 14:51:22 +0000
(16:51 +0200)
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>
sound/pci/rme9652/hdsp.c
patch
|
blob
|
history
diff --git
a/sound/pci/rme9652/hdsp.c
b/sound/pci/rme9652/hdsp.c
index 2411f0b396b4adad390047a6ef80948ef244cb8c..ff26a3672d403152b81fe946c71c4b05f601bef4 100644
(file)
--- 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