]> err.no Git - linux-2.6/blobdiff - sound/core/sound.c
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6] / sound / core / sound.c
index df4ab94d006e0f191058c6a9cb566310d3090188..4d28e52126118bbc57659825ac6b93579de18a88 100644 (file)
@@ -121,7 +121,7 @@ void *snd_lookup_minor_data(unsigned int minor, int type)
        struct snd_minor *mreg;
        void *private_data;
 
-       if (minor > ARRAY_SIZE(snd_minors))
+       if (minor >= ARRAY_SIZE(snd_minors))
                return NULL;
        mutex_lock(&sound_mutex);
        mreg = snd_minors[minor];
@@ -140,7 +140,7 @@ static int snd_open(struct inode *inode, struct file *file)
        struct file_operations *old_fops;
        int err = 0;
 
-       if (minor > ARRAY_SIZE(snd_minors))
+       if (minor >= ARRAY_SIZE(snd_minors))
                return -ENODEV;
        mptr = snd_minors[minor];
        if (mptr == NULL) {