patch-2.1.78 linux/kernel/module.c

Next file: linux/mm/filemap.c
Previous file: linux/kernel/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.77/linux/kernel/module.c linux/kernel/module.c
@@ -772,8 +772,10 @@
 	/* Let the module clean up.  */
 
 	mod->flags |= MOD_DELETED;
-	if (mod->flags & MOD_RUNNING) {
-		mod->cleanup();
+	if (mod->flags & MOD_RUNNING) 
+	{
+		if(mod->cleanup)
+			mod->cleanup();
 		mod->flags &= ~MOD_RUNNING;
 	}
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov