patch-2.4.21 linux-2.4.21/drivers/input/evdev.c

Next file: linux-2.4.21/drivers/input/input.c
Previous file: linux-2.4.21/drivers/ieee1394/video1394.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/input/evdev.c linux-2.4.21/drivers/input/evdev.c
@@ -223,6 +223,9 @@
 	struct input_dev *dev = evdev->handle.dev;
 	int retval;
 
+	if (!evdev->exist)
+		return -ENODEV;
+
 	switch (cmd) {
 
 		case EVIOCGVERSION:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)