[ALSA] sound/pci/cs46xx/: fix an off-by-one
authorAdrian Bunk <bunk@stusta.de>
Tue, 24 Jul 2007 09:56:45 +0000 (11:56 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 13:57:54 +0000 (15:57 +0200)
This patch fixes an off-by-one in a snd_assert() spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/cs46xx/dsp_spos_scb_lib.c

index 57e357de1500c643cf6a9629a12036780de7f12b..eded4dfeba1210fe307d7f526e39d3c1f0856ed1 100644 (file)
@@ -1480,7 +1480,7 @@ void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
        if (!pcm_channel->src_scb->ref_count) {
                cs46xx_dsp_remove_scb(chip,pcm_channel->src_scb);
 
-               snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot <= DSP_MAX_SRC_NR,
+               snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot < DSP_MAX_SRC_NR,
                            return );
 
                ins->src_scb_slots[pcm_channel->src_slot] = 0;