]> err.no Git - linux-2.6/commitdiff
[SCSI] aacraid: Error path cleanup
authorMark Haverkamp <markh@osdl.org>
Mon, 27 Mar 2006 17:44:11 +0000 (09:44 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Thu, 13 Apr 2006 15:13:18 +0000 (10:13 -0500)
Received from Mark Salyzyn

Some of the error return paths during initialization resulted in a zero
report to caller

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/linit.c

index 9f3cc7b7123d3736f8f79543a8b797cc06b35742..78c82f774535ccbdf2d67df37642a09acf875344 100644 (file)
@@ -800,10 +800,11 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
        error = pci_enable_device(pdev);
        if (error)
                goto out;
+       error = -ENODEV;
 
        if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 
                        pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))
-               goto out;
+               goto out_disable_pdev;
        /*
         * If the quirk31 bit is set, the adapter needs adapter
         * to driver communication memory to be allocated below 2gig
@@ -811,7 +812,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
        if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) 
                if (pci_set_dma_mask(pdev, DMA_31BIT_MASK) ||
                                pci_set_consistent_dma_mask(pdev, DMA_31BIT_MASK))
-                       goto out;
+                       goto out_disable_pdev;
        
        pci_set_master(pdev);