public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: perex@suse.cz
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] sound/pci/cs46xx/: fix an off-by-one
Date: Mon, 23 Jul 2007 16:51:16 +0200	[thread overview]
Message-ID: <20070723145116.GL26212@stusta.de> (raw)

This patch fixes an off-by-one in a snd_assert() spotted by the 
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
--- linux-2.6.22-rc6-mm1/sound/pci/cs46xx/dsp_spos_scb_lib.c.old	2007-07-23 15:33:17.000000000 +0200
+++ linux-2.6.22-rc6-mm1/sound/pci/cs46xx/dsp_spos_scb_lib.c	2007-07-23 15:33:37.000000000 +0200
@@ -1480,7 +1480,7 @@ void cs46xx_dsp_destroy_pcm_channel (str
 	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;


             reply	other threads:[~2007-07-23 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 14:51 Adrian Bunk [this message]
2007-07-24 12:32 ` [2.6 patch] sound/pci/cs46xx/: fix an off-by-one Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070723145116.GL26212@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox