[SCSI] SCSI: aic7xxx_osm_pci resource leak fix.
authorJesper Juhl <jesper.juhl@gmail.com>
Sun, 23 Apr 2006 18:16:02 +0000 (20:16 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 25 Apr 2006 23:08:13 +0000 (18:08 -0500)
Fix resource leak in
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c::ahc_linux_pci_dev_probe()

Found by the coverity checker (#668)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c

index cb30d9c1153d5394c08db57f6b64486bfcd1592a..0c9c2f400bf6b21982c4fdb5e1fa0974bb372f5c 100644 (file)
@@ -219,6 +219,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                ahc->flags |= AHC_39BIT_ADDRESSING;
        } else {
                if (dma_set_mask(dev, DMA_32BIT_MASK)) {
+                       ahc_free(ahc);
                        printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
                        return (-ENODEV);
                }