Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a3988f6d2c5be9d02463097775d1c66a8290527 Commit: 2a3988f6d2c5be9d02463097775d1c66a8290527 Parent: ea045ee4d381428ec9c056ff5848bc619d84986a Author: Takashi Iwai <[EMAIL PROTECTED]> AuthorDate: Tue Oct 16 14:26:32 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Tue Oct 16 16:51:22 2007 +0200
[ALSA] hdsp - Fix zero division Fix zero-division bug in the calculation dds offset. Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- 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 2411f0b..ff26a36 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 - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html