Add scsi_add_host() failure handling for the Linux Driver for BusLogic
MultiMaster and FlashPoint SCSI Host Adapters
Signed-off-by: Ashutosh Naik <[email protected]>
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++;
}
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]