]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/drivers/opl3/opl3_midi.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / sound / drivers / opl3 / opl3_midi.c
index cebcb8b78acb8af1e1066f919bb5124b83b6c821..16feafa2c51e872cfb6266b3882e76b407c1180e 100644 (file)
@@ -617,7 +617,8 @@ static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
 
        struct snd_opl3_voice *vp, *vp2;
 
-       snd_assert(voice < MAX_OPL3_VOICES, return);
+       if (snd_BUG_ON(voice >= MAX_OPL3_VOICES))
+               return;
 
        vp = &opl3->voices[voice];
        if (voice < MAX_OPL2_VOICES) {
@@ -737,7 +738,8 @@ static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
 
        struct snd_opl3_voice *vp;
 
-       snd_assert(voice < MAX_OPL3_VOICES, return);
+       if (snd_BUG_ON(voice >= MAX_OPL3_VOICES))
+               return;
 
        vp = &opl3->voices[voice];
        if (vp->chan == NULL)