patch-2.0.31 linux/drivers/scsi/scsi_module.c

Next file: linux/drivers/scsi/scsi_proc.c
Previous file: linux/drivers/scsi/scsi_ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.30/linux/drivers/scsi/scsi_module.c linux/drivers/scsi/scsi_module.c
@@ -34,7 +34,11 @@
 int init_module(void) {
     driver_template.usage_count = &mod_use_count_;
     scsi_register_module(MODULE_SCSI_HA, &driver_template);
-    return (driver_template.present == 0);
+    if (driver_template.present)
+    	return 0;
+
+    scsi_unregister_module(MODULE_SCSI_HA, &driver_template);
+    return -1;
 }
 
 void cleanup_module( void) {

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