PATCH [1/2] scsi/BusLogic.c:Handle scsi_add_host failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add scsi_add_host() failure handling for the Linux Driver for BusLogic
MultiMaster and FlashPoint SCSI Host Adapters

Signed-off-by: Ashutosh Naik <ashutosh.naik@xxxxxxxxx>
diff -Naurp linux-2.6.15-git6-vanilla/drivers/scsi/BusLogic.c linux-2.6.15-git6/drivers/scsi/BusLogic.c
--- linux-2.6.15-git6-vanilla/drivers/scsi/BusLogic.c	2005-10-28 05:32:08.000000000 +0530
+++ linux-2.6.15-git6/drivers/scsi/BusLogic.c	2006-01-11 14:12:37.000000000 +0530
@@ -2173,7 +2173,7 @@ static int BusLogic_SlaveConfigure(struc
 
 static int __init BusLogic_init(void)
 {
-	int BusLogicHostAdapterCount = 0, DriverOptionsIndex = 0, ProbeIndex;
+	int BusLogicHostAdapterCount = 0, DriverOptionsIndex = 0, ProbeIndex, retval;
 	struct BusLogic_HostAdapter *PrototypeHostAdapter;
 
 #ifdef MODULE
@@ -2296,7 +2296,12 @@ static int __init BusLogic_init(void)
 				scsi_host_put(Host);
 			} else {
 				BusLogic_InitializeHostStructure(HostAdapter, Host);
-				scsi_add_host(Host, NULL);
+				retval = scsi_add_host(Host, NULL);
+				if (retval) {
+					printk(KERN_WARNING "BusLogic: scsi_add_host failed\n");
+					scsi_host_put(host);
+					return retval;
+				}
 				scsi_scan_host(Host);
 				BusLogicHostAdapterCount++;
 			}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux