* [PATCH 2/2] scsi/pcmcia/nsp_cs.c: Handle scsi_add_host failure
@ 2006-01-11 9:40 Ashutosh Naik
0 siblings, 0 replies; only message in thread
From: Ashutosh Naik @ 2006-01-11 9:40 UTC (permalink / raw)
To: yokota, linux-scsi, linux-kernel, Andrew Morton, James.Bottomley
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
Add scsi_add_host() failure handling for the NinjaSCSI-3 /
NinjaSCSI-32Bi PCMCIA SCSI host adapter card driver
Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>
[-- Attachment #2: nsp_cs.txt --]
[-- Type: text/plain, Size: 1008 bytes --]
diff -Naurp linux-2.6.15-git6-vanilla/drivers/scsi/pcmcia/nsp_cs.c linux-2.6.15-git6/drivers/scsi/pcmcia/nsp_cs.c
--- linux-2.6.15-git6-vanilla/drivers/scsi/pcmcia/nsp_cs.c 2006-01-11 12:56:56.000000000 +0530
+++ linux-2.6.15-git6/drivers/scsi/pcmcia/nsp_cs.c 2006-01-11 12:51:34.000000000 +0530
@@ -1678,7 +1678,7 @@ static void nsp_cs_config(dev_link_t *li
scsi_info_t *info = link->priv;
tuple_t tuple;
cisparse_t parse;
- int last_ret, last_fn;
+ int last_ret, last_fn, retval;
unsigned char tuple_data[64];
config_info_t conf;
win_req_t req;
@@ -1854,7 +1854,13 @@ static void nsp_cs_config(dev_link_t *li
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,74))
- scsi_add_host (host, NULL);
+ retval = scsi_add_host (host, NULL);
+ if (retval) {
+ printk(KERN_WARNING "nsp_cs: scsi_add_host failed\n");
+ scsi_host_put(host);
+ return retval;
+ }
+
scsi_scan_host(host);
snprintf(info->node.dev_name, sizeof(info->node.dev_name), "scsi%d", host->host_no);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-11 9:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-11 9:40 [PATCH 2/2] scsi/pcmcia/nsp_cs.c: Handle scsi_add_host failure Ashutosh Naik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).