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

Next file: linux/drivers/scsi/sg.c
Previous file: linux/drivers/scsi/ncr53c8xx.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.56/linux/drivers/scsi/scsi_module.c linux/drivers/scsi/scsi_module.c
@@ -34,7 +34,11 @@
 int init_module(void) {
     driver_template.module = &__this_module;
     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