patch-1.3.60 linux/drivers/char/mouse.c

Next file: linux/drivers/char/serial.c
Previous file: linux/drivers/char/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/drivers/char/mouse.c linux/drivers/char/mouse.c
@@ -14,6 +14,9 @@
  * of the mouse drivers, as they are now completely independent. Linus.
  *
  * Support for loadable modules. 8-Sep-95 Philip Blundell <pjb27@cam.ac.uk>
+ *
+ * Fixed a failing symbol register to free the device registration
+ *		Alan Cox <alan@lxorguk.ukuu.org.uk> 21-Jan-96
  */
 
 #include <linux/module.h>
@@ -137,5 +140,10 @@
 		return -EIO;
 	}
 
-	return register_symtab(&mouse_syms);
+	if(register_symtab(&mouse_syms)!=0)
+	{
+		unregister_chrdev(MOUSE_MAJOR, "mouse");
+		return -EIO;
+	}
+	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this