Skip to contentSkip to conversation

check for can_queue != 0 in scsi_host_alloc

PATCH New Christoph Hellwig 1 participant 1 message Jun 24, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 check for can_queue != 0 in scsi_host_alloc

This is to give a proper warning if someone tries to load an unconverted old-style driver.

drivers/scsi/hosts.c +6 -0
@@ -144,6 +144,12 @@
 		dump_stack();
         }
 
+	if (!sht->can_queue) {
+		printk(KERN_ERR "%s: can_queue = 0 no more supported\n",
+				sht->name);
+		return NULL;
+	}
+
 	/* if its not set in the template, use the default */
 	if (!sht->shost_attrs)
 		 sht->shost_attrs = scsi_sysfs_shost_attrs;