summaryrefslogtreecommitdiffstats
path: root/sound/core/sound_oss.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-13 14:14:10 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:37:31 +0100
commit3a63e44420932852efd6a7d6d46cdad4d427f880 (patch)
treeccabe72933a23a2d8553d399128d7a35d4a21570 /sound/core/sound_oss.c
parent646494007b48e8897888cd407c2b7d1d69cb2e58 (diff)
downloadop-kernel-dev-3a63e44420932852efd6a7d6d46cdad4d427f880.zip
op-kernel-dev-3a63e44420932852efd6a7d6d46cdad4d427f880.tar.gz
[ALSA] sound/core/: fix 3 off-by-one errors
Modules: ALSA Core This patch fixes three off-by-one errors found by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound_oss.c')
-rw-r--r--sound/core/sound_oss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 6b4a4bc..4023d3b 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -46,7 +46,7 @@ void *snd_lookup_oss_minor_data(unsigned int minor, int type)
struct snd_minor *mreg;
void *private_data;
- if (minor > ARRAY_SIZE(snd_oss_minors))
+ if (minor >= ARRAY_SIZE(snd_oss_minors))
return NULL;
mutex_lock(&sound_oss_mutex);
mreg = snd_oss_minors[minor];
OpenPOWER on IntegriCloud