patch-2.4.0-test11 linux/drivers/input/evdev.c
Next file: linux/drivers/input/input.c
Previous file: linux/drivers/ide/via82cxxx.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Fri Nov 17 16:52:23 2000
- Orig file:
v2.4.0-test10/linux/drivers/input/evdev.c
- Orig date:
Thu Jul 27 18:36:54 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/input/evdev.c linux/drivers/input/evdev.c
@@ -123,7 +123,7 @@
struct evdev_list *list;
int i = MINOR(inode->i_rdev) - EVDEV_MINOR_BASE;
- if (i > EVDEV_MINORS || !evdev_table[i])
+ if (i >= EVDEV_MINORS || !evdev_table[i])
return -ENODEV;
if (!(list = kmalloc(sizeof(struct evdev_list), GFP_KERNEL)))
@@ -288,7 +288,7 @@
int minor;
for (minor = 0; minor < EVDEV_MINORS && evdev_table[minor]; minor++);
- if (evdev_table[minor]) {
+ if (minor == EVDEV_MINORS) {
printk(KERN_ERR "evdev: no more free evdev devices\n");
return NULL;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)