diff options
author | GOTO Masanori <gotom@sanori.org> | 2006-06-25 04:58:56 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-26 17:31:01 -0400 |
commit | 3e7196cf6070821ff8246b15dfd219ffa6409062 (patch) | |
tree | 3421b231842340b0cb45b19878c8aa64ecb8e8d7 /drivers/scsi/nsp32.c | |
parent | 041976fb6ae851cd18d96584a5d6361b564c9974 (diff) |
[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.c | 9 |
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) | |||
2886 | } | 2886 | } |
2887 | 2887 | ||
2888 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) | 2888 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) |
2889 | scsi_add_host (host, &PCIDEV->dev); | 2889 | ret = scsi_add_host(host, &PCIDEV->dev); |
2890 | if (ret) { | ||
2891 | nsp32_msg(KERN_ERR, "failed to add scsi host"); | ||
2892 | goto free_region; | ||
2893 | } | ||
2890 | scsi_scan_host(host); | 2894 | scsi_scan_host(host); |
2891 | #endif | 2895 | #endif |
2892 | pci_set_drvdata(PCIDEV, host); | 2896 | pci_set_drvdata(PCIDEV, host); |
2893 | return DETECT_OK; | 2897 | return DETECT_OK; |
2894 | 2898 | ||
2899 | free_region: | ||
2900 | release_region(host->io_port, host->n_io_port); | ||
2901 | |||
2895 | free_irq: | 2902 | free_irq: |
2896 | free_irq(host->irq, data); | 2903 | free_irq(host->irq, data); |
2897 | 2904 | ||