lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] scsi/pcmcia/nsp_cs.c: Handle scsi_add_host failure
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>
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);
\
 
 \ /
  Last update: 2006-01-11 10:43    [W:0.040 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site