sound/pci/cs46xx/: fix an off-by-one
PATCH 1/1 sound/pci/cs46xx/: fix an off-by-one
This patch fixes an off-by-one in a snd_assert() spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
---
sound/pci/cs46xx/dsp_spos_scb_lib.c renamed from sound/pci/cs46xx/dsp_spos_scb_lib.c.old +1 -1
@@ -1480,7 +1480,7 @@ void cs46xx_dsp_destroy_pcm_channel (strif (!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 ;
Takashi Iwai
AppliedAt Mon, 23 Jul 2007 16:51:16 +0200,
Quoted 5 lines · Adrian Bunk
This patch fixes an off-by-one in a
snd_assert()spotted by the Coverity checker.Signed-off-by Adrian Bunk <[email protected]>
Applied it to ALSA tree. Thanks.
Takashi
Quoted 20 lines
---
sound/pci/cs46xx/dsp_spos_scb_lib.c renamed from sound/pci/cs46xx/dsp_spos_scb_lib.c.old +1
-2@@ -1480,7 +1480,7 @@ void cs46xx_dsp_destroy_pcm_channel (strif (!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 ; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/