aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
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