summaryrefslogtreecommitdiff
path: root/sound/drivers/vx/vx_uer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/vx/vx_uer.c')
-rw-r--r--sound/drivers/vx/vx_uer.c6
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)
{
int hexfreq;
- snd_assert(freq > 0, return 0);
+ if (snd_BUG_ON(freq <= 0))
+ return 0;
hexfreq = (28224000 * 10) / freq;
hexfreq = (hexfreq + 5) / 10;
/* max freq = 55125 Hz */
- snd_assert(hexfreq > 0x00000200, return 0);
+ if (snd_BUG_ON(hexfreq <= 0x00000200))
+ return 0;
if (hexfreq <= 0x03ff)
return hexfreq - 0x00000201;