Skip to content

Commit

Permalink
[SCSI] SCSI/aha1740: handle SCSI API errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Jeff Garzik authored and James Bottomley committed Nov 15, 2006
1 parent 4225285 commit 08157cd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/scsi/aha1740.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 08157cd

Please sign in to comment.