diff options
Diffstat (limited to 'sound/drivers/vx/vx_uer.c')
-rw-r--r-- | sound/drivers/vx/vx_uer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c index fb8932af888d..0e1ba9b47904 100644 --- a/sound/drivers/vx/vx_uer.c +++ b/sound/drivers/vx/vx_uer.c | |||
@@ -163,13 +163,15 @@ static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) | |||
163 | { | 163 | { |
164 | int hexfreq; | 164 | int hexfreq; |
165 | 165 | ||
166 | snd_assert(freq > 0, return 0); | 166 | if (snd_BUG_ON(freq <= 0)) |
167 | return 0; | ||
167 | 168 | ||
168 | hexfreq = (28224000 * 10) / freq; | 169 | hexfreq = (28224000 * 10) / freq; |
169 | hexfreq = (hexfreq + 5) / 10; | 170 | hexfreq = (hexfreq + 5) / 10; |
170 | 171 | ||
171 | /* max freq = 55125 Hz */ | 172 | /* max freq = 55125 Hz */ |
172 | snd_assert(hexfreq > 0x00000200, return 0); | 173 | if (snd_BUG_ON(hexfreq <= 0x00000200)) |
174 | return 0; | ||
173 | 175 | ||
174 | if (hexfreq <= 0x03ff) | 176 | if (hexfreq <= 0x03ff) |
175 | return hexfreq - 0x00000201; | 177 | return hexfreq - 0x00000201; |