diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-11-08 22:56:19 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-15 17:38:58 -0500 |
commit | 08157cd0787004e2ebf9ee8cc92257244da53848 (patch) | |
tree | bc7e932c33cd5959f98dca91120013a34d772ee1 /drivers | |
parent | 42252854011b31fe63ffeca44ac941e6fe8277ae (diff) |
[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')
-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 = { | |||
586 | 586 | ||
587 | static int aha1740_probe (struct device *dev) | 587 | static int aha1740_probe (struct device *dev) |
588 | { | 588 | { |
589 | int slotbase; | 589 | int slotbase, rc; |
590 | unsigned int irq_level, irq_type, translation; | 590 | unsigned int irq_level, irq_type, translation; |
591 | struct Scsi_Host *shpnt; | 591 | struct Scsi_Host *shpnt; |
592 | struct aha1740_hostdata *host; | 592 | struct aha1740_hostdata *host; |
@@ -641,10 +641,16 @@ static int aha1740_probe (struct device *dev) | |||
641 | } | 641 | } |
642 | 642 | ||
643 | eisa_set_drvdata (edev, shpnt); | 643 | eisa_set_drvdata (edev, shpnt); |
644 | scsi_add_host (shpnt, dev); /* XXX handle failure */ | 644 | |
645 | rc = scsi_add_host (shpnt, dev); | ||
646 | if (rc) | ||
647 | goto err_irq; | ||
648 | |||
645 | scsi_scan_host (shpnt); | 649 | scsi_scan_host (shpnt); |
646 | return 0; | 650 | return 0; |
647 | 651 | ||
652 | err_irq: | ||
653 | free_irq(irq_level, shpnt); | ||
648 | err_unmap: | 654 | err_unmap: |
649 | dma_unmap_single (&edev->dev, host->ecb_dma_addr, | 655 | dma_unmap_single (&edev->dev, host->ecb_dma_addr, |
650 | sizeof (host->ecb), DMA_BIDIRECTIONAL); | 656 | sizeof (host->ecb), DMA_BIDIRECTIONAL); |