diff options
Diffstat (limited to 'sound/pci/sonicvibes.c')
-rw-r--r-- | sound/pci/sonicvibes.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 0d3d305b0a0b..cd408b86c839 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -534,8 +534,8 @@ static int snd_sonicvibes_hw_constraint_dac_rate(struct snd_pcm_hw_params *param | |||
534 | params->rate_den = 1; | 534 | params->rate_den = 1; |
535 | } else { | 535 | } else { |
536 | snd_sonicvibes_pll(rate, &r, &m, &n); | 536 | snd_sonicvibes_pll(rate, &r, &m, &n); |
537 | snd_assert((SV_REFFREQUENCY % 16) == 0, return -EINVAL); | 537 | snd_BUG_ON(SV_REFFREQUENCY % 16); |
538 | snd_assert((SV_ADCMULT % 512) == 0, return -EINVAL); | 538 | snd_BUG_ON(SV_ADCMULT % 512); |
539 | params->rate_num = (SV_REFFREQUENCY/16) * (n+2) * r; | 539 | params->rate_num = (SV_REFFREQUENCY/16) * (n+2) * r; |
540 | params->rate_den = (SV_ADCMULT/512) * (m+2); | 540 | params->rate_den = (SV_ADCMULT/512) * (m+2); |
541 | } | 541 | } |
@@ -849,7 +849,8 @@ static int __devinit snd_sonicvibes_pcm(struct sonicvibes * sonic, int device, s | |||
849 | 849 | ||
850 | if ((err = snd_pcm_new(sonic->card, "s3_86c617", device, 1, 1, &pcm)) < 0) | 850 | if ((err = snd_pcm_new(sonic->card, "s3_86c617", device, 1, 1, &pcm)) < 0) |
851 | return err; | 851 | return err; |
852 | snd_assert(pcm != NULL, return -EINVAL); | 852 | if (snd_BUG_ON(!pcm)) |
853 | return -EINVAL; | ||
853 | 854 | ||
854 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sonicvibes_playback_ops); | 855 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sonicvibes_playback_ops); |
855 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sonicvibes_capture_ops); | 856 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sonicvibes_capture_ops); |
@@ -1089,7 +1090,8 @@ static int __devinit snd_sonicvibes_mixer(struct sonicvibes * sonic) | |||
1089 | unsigned int idx; | 1090 | unsigned int idx; |
1090 | int err; | 1091 | int err; |
1091 | 1092 | ||
1092 | snd_assert(sonic != NULL && sonic->card != NULL, return -EINVAL); | 1093 | if (snd_BUG_ON(!sonic || !sonic->card)) |
1094 | return -EINVAL; | ||
1093 | card = sonic->card; | 1095 | card = sonic->card; |
1094 | strcpy(card->mixername, "S3 SonicVibes"); | 1096 | strcpy(card->mixername, "S3 SonicVibes"); |
1095 | 1097 | ||