]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/pci/rme9652/hdsp.c
[ALSA] hdsp - Fix zero division
[karo-tx-linux.git] / sound / pci / rme9652 / hdsp.c
index 2411f0b396b4adad390047a6ef80948ef244cb8c..ff26a3672d403152b81fe946c71c4b05f601bef4 100644 (file)
@@ -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