diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-11-09 04:56:19 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-15 23:38:58 +0100 |
commit | 08157cd0787004e2ebf9ee8cc92257244da53848 (patch) | |
tree | bc7e932c33cd5959f98dca91120013a34d772ee1 /drivers/scsi/aha1740.c | |
parent | [SCSI] st: log message changes (diff) | |
download | linux-08157cd0787004e2ebf9ee8cc92257244da53848.tar.xz linux-08157cd0787004e2ebf9ee8cc92257244da53848.zip |
[SCSI] SCSI/aha1740: handle SCSI API errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aha1740.c')
-rw-r--r-- | drivers/scsi/aha1740.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index c3c38a7e8d32..d7af9c63a04d 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c @@ -586,7 +586,7 @@ static struct scsi_host_template aha1740_template = { static int aha1740_probe (struct device *dev) { - int slotbase; + int slotbase, rc; unsigned int irq_level, irq_type, translation; struct Scsi_Host *shpnt; struct aha1740_hostdata *host; @@ -641,10 +641,16 @@ static int aha1740_probe (struct device *dev) } eisa_set_drvdata (edev, shpnt); - scsi_add_host (shpnt, dev); /* XXX handle failure */ + + rc = scsi_add_host (shpnt, dev); + if (rc) + goto err_irq; + scsi_scan_host (shpnt); return 0; + err_irq: + free_irq(irq_level, shpnt); err_unmap: dma_unmap_single (&edev->dev, host->ecb_dma_addr, sizeof (host->ecb), DMA_BIDIRECTIONAL); |