patch-2.1.126 linux/drivers/char/joystick/joystick.c
Next file: linux/drivers/char/lp.c
Previous file: linux/drivers/char/joystick/joy-turbografx.c
Back to the patch index
Back to the overall index
-  Lines: 17
-  Date:
Wed Oct 21 08:43:34 1998
-  Orig file: 
v2.1.125/linux/drivers/char/joystick/joystick.c
-  Orig date: 
Fri Oct  9 13:27:08 1998
diff -u --recursive --new-file v2.1.125/linux/drivers/char/joystick/joystick.c linux/drivers/char/joystick/joystick.c
@@ -859,6 +859,7 @@
 	struct js_dev *jd = js_dev;
 	int i = MINOR(inode->i_rdev);
 	unsigned long flags;
+	int result;
 
 	if (MAJOR(inode->i_rdev) != JOYSTICK_MAJOR)
 		return -EINVAL;
@@ -870,7 +871,7 @@
 
 	if (!jd) return -ENODEV;
 
-	jd->open(jd);
+	if ((result = jd->open(jd))) return result;
 
 	MOD_INC_USE_COUNT;
 	if (!js_use_count++) js_do_timer(0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov