mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
[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>
This commit is contained in:
parent
4225285401
commit
08157cd078
@ -586,7 +586,7 @@ static struct scsi_host_template aha1740_template = {
|
|||||||
|
|
||||||
static int aha1740_probe (struct device *dev)
|
static int aha1740_probe (struct device *dev)
|
||||||
{
|
{
|
||||||
int slotbase;
|
int slotbase, rc;
|
||||||
unsigned int irq_level, irq_type, translation;
|
unsigned int irq_level, irq_type, translation;
|
||||||
struct Scsi_Host *shpnt;
|
struct Scsi_Host *shpnt;
|
||||||
struct aha1740_hostdata *host;
|
struct aha1740_hostdata *host;
|
||||||
@ -641,10 +641,16 @@ static int aha1740_probe (struct device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
eisa_set_drvdata (edev, shpnt);
|
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);
|
scsi_scan_host (shpnt);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_irq:
|
||||||
|
free_irq(irq_level, shpnt);
|
||||||
err_unmap:
|
err_unmap:
|
||||||
dma_unmap_single (&edev->dev, host->ecb_dma_addr,
|
dma_unmap_single (&edev->dev, host->ecb_dma_addr,
|
||||||
sizeof (host->ecb), DMA_BIDIRECTIONAL);
|
sizeof (host->ecb), DMA_BIDIRECTIONAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user