Skip to contentSkip to conversation

scsi_register-002

PATCH New Rusty Trivial Russell 1 participant 1 message Feb 6, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_register-002

(Included in 2.5)
From: Michael Still <[email protected]>

This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...

drivers/scsi/aacraid/linit.c renamed from drivers/scsi/aacraid/linit.c.orig +3 -0
@@ -203,6 +203,9 @@
 			 * specific information.
 			 */
 			host_ptr = scsi_register( template, sizeof(struct aac_dev) );
+			if(host_ptr == NULL)
+				continue;
+
 			/* 
 			 * These three parameters can be used to allow for wide SCSI 
 			 * and for host adapters that support multiple buses.
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: Michael Still <[email protected]>: [Trivial Patch] scsi_register-002