[PATCH] scsi/pcmcia/fdomain_stub.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  Future Domain-compatible
PCMCIA SCSI driver.

Signed-off-by: Ashutosh Naik <ashutosh.naik@xxxxxxxxx>
diff -Naurp linux-2.6.15-git5-vanilla/drivers/scsi/pcmcia/fdomain_stub.c linux-2.6.15-git5/drivers/scsi/pcmcia/fdomain_stub.c
--- linux-2.6.15-git5-vanilla/drivers/scsi/pcmcia/fdomain_stub.c	2006-01-10 16:24:06.000000000 +0530
+++ linux-2.6.15-git5/drivers/scsi/pcmcia/fdomain_stub.c	2006-01-10 18:17:47.000000000 +0530
@@ -143,6 +143,7 @@ static void fdomain_config(dev_link_t *l
     u_char tuple_data[64];
     char str[16];
     struct Scsi_Host *host;
+    int retval;
 
     DEBUG(0, "fdomain_config(0x%p)\n", link);
 
@@ -188,7 +189,13 @@ static void fdomain_config(dev_link_t *l
 	goto cs_failed;
     }
  
-    scsi_add_host(host, NULL); /* XXX handle failure */
+    retval = scsi_add_host(host, NULL);
+    if (retval) {
+	printk(KERN_WARNING "fdomain_cs: scsi_add_host failed\n");
+	scsi_host_put(host);
+	return retval;
+    }
+
     scsi_scan_host(host);
 
     sprintf(info->node.dev_name, "scsi%d", host->host_no);

[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