summaryrefslogtreecommitdiff
path: root/drivers/scsi/nsp32.c
diff options
context:
space:
mode:
authorGOTO Masanori <gotom@sanori.org>2006-06-25 01:58:56 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-26 16:31:01 -0500
commit3e7196cf6070821ff8246b15dfd219ffa6409062 (patch)
tree3421b231842340b0cb45b19878c8aa64ecb8e8d7 /drivers/scsi/nsp32.c
parent041976fb6ae851cd18d96584a5d6361b564c9974 (diff)
downloadlwn-3e7196cf6070821ff8246b15dfd219ffa6409062.tar.gz
lwn-3e7196cf6070821ff8246b15dfd219ffa6409062.zip
[SCSI] Add scsi_add_host() failure handling for nsp32
Add scsi_add_host() failure handling for nsp32 and silence warning. drivers/scsi/nsp32.c:2888: warning: ignoring return value of 'Scsi_add_host', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: GOTO Masanori <gotom@sanori.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/nsp32.c')
-rw-r--r--drivers/scsi/nsp32.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 5c55e152e718..159fd5d8f98d 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2886,12 +2886,19 @@ static int nsp32_detect(struct scsi_host_template *sht)
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
- scsi_add_host (host, &PCIDEV->dev);
+ ret = scsi_add_host(host, &PCIDEV->dev);
+ if (ret) {
+ nsp32_msg(KERN_ERR, "failed to add scsi host");
+ goto free_region;
+ }
scsi_scan_host(host);
#endif
pci_set_drvdata(PCIDEV, host);
return DETECT_OK;
+ free_region:
+ release_region(host->io_port, host->n_io_port);
+
free_irq:
free_irq(host->irq, data);