mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi/pcmcia/fdomain_stub.c: Handle scsi_add_host failure
@ 2006-01-10 12:58 Ashutosh Naik
  2006-01-13 18:06 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Ashutosh Naik @ 2006-01-10 12:58 UTC (permalink / raw)
  To: linux-scsi, James.Bottomley, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

Add scsi_add_host() failure handling for the  Future Domain-compatible
PCMCIA SCSI driver.

Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>

[-- Attachment #2: pcmcia-fdomain.txt --]
[-- Type: text/plain, Size: 931 bytes --]

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-13 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-10 12:58 [PATCH] scsi/pcmcia/fdomain_stub.c: Handle scsi_add_host failure Ashutosh Naik
2006-01-13 18:06 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome