1 --- a/drivers/ide/pci/aec62xx.c
2 +++ b/drivers/ide/pci/aec62xx.c
5 static int __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
7 - unsigned long dma_base = pci_resource_start(dev, 4);
8 + unsigned long dma_base;
11 + err = pci_enable_device(dev);
15 + dma_base = pci_resource_start(dev, 4);
17 if (inb(dma_base + 2) & 0x10) {
18 d->name = (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R) ?
20 d->udma_mask = 0x7f; /* udma0-6 */
23 - return ide_setup_pci_device(dev, d);
24 + err = ide_setup_pci_device(dev, d);
26 + pci_disable_device(dev);
31 static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {