Add scsi_add_host() failure handling for the Future Domain-compatible
PCMCIA SCSI driver.
Signed-off-by: Ashutosh Naik <[email protected]>
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);
[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]