diff options
Diffstat (limited to 'sound/drivers/opl3/opl3_midi.c')
-rw-r--r-- | sound/drivers/opl3/opl3_midi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index cebcb8b78acb..16feafa2c51e 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c | |||
@@ -617,7 +617,8 @@ static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice) | |||
617 | 617 | ||
618 | struct snd_opl3_voice *vp, *vp2; | 618 | struct snd_opl3_voice *vp, *vp2; |
619 | 619 | ||
620 | snd_assert(voice < MAX_OPL3_VOICES, return); | 620 | if (snd_BUG_ON(voice >= MAX_OPL3_VOICES)) |
621 | return; | ||
621 | 622 | ||
622 | vp = &opl3->voices[voice]; | 623 | vp = &opl3->voices[voice]; |
623 | if (voice < MAX_OPL2_VOICES) { | 624 | if (voice < MAX_OPL2_VOICES) { |
@@ -737,7 +738,8 @@ static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice) | |||
737 | 738 | ||
738 | struct snd_opl3_voice *vp; | 739 | struct snd_opl3_voice *vp; |
739 | 740 | ||
740 | snd_assert(voice < MAX_OPL3_VOICES, return); | 741 | if (snd_BUG_ON(voice >= MAX_OPL3_VOICES)) |
742 | return; | ||
741 | 743 | ||
742 | vp = &opl3->voices[voice]; | 744 | vp = &opl3->voices[voice]; |
743 | if (vp->chan == NULL) | 745 | if (vp->chan == NULL) |