
From: Adrian Bunk <bunk@stusta.de>

This patch fixes an array overflow found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/sound/oss/sonicvibes.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN sound/oss/sonicvibes.c~sound-oss-sonicvibesc-fix-an-array-overflow sound/oss/sonicvibes.c
--- 25/sound/oss/sonicvibes.c~sound-oss-sonicvibesc-fix-an-array-overflow	2005-04-10 15:14:04.000000000 -0700
+++ 25-akpm/sound/oss/sonicvibes.c	2005-04-10 15:14:04.000000000 -0700
@@ -1149,7 +1149,7 @@ static int mixer_ioctl(struct sv_state *
 			if (mixtable[i].rec)
 				break;
 		}
-		if (!mixtable[i].rec)
+		if (i == SOUND_MIXER_NRDEVICES)
 			return 0;
 		spin_lock_irqsave(&s->lock, flags);
 		frobindir(s, SV_CIMIX_ADCINL, 0x1f, mixtable[i].rec << 5);
_
