took into account possibility of pci_enable_device() failing
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 9 Aug 2001 23:37:09 +0000 (23:37 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 9 Aug 2001 23:37:09 +0000 (23:37 +0000)
comedi/drivers/cb_pcidda.c
comedi/drivers/das08.c

index 1f4d798de94a6b75411d89f9f66370b40ec53f24..40e9e9f4f5afaac9f44b4a00b6b006e6962e3aee 100644 (file)
@@ -295,7 +295,8 @@ found:
                devpriv->pci_dev->base_address[DAC_BADRINDEX] &
                        PCI_BASE_ADDRESS_IO_MASK;
 #else
-       pci_enable_device(devpriv->pci_dev);
+       if(pci_enable_device(devpriv->pci_dev))
+               return -EIO;
        digitalio =
                devpriv->pci_dev->resource[DIGITALIO_BADRINDEX].start &
                        PCI_BASE_ADDRESS_IO_MASK;
index 7d008a631d10e6a9d23271012d3bdbf7129798b3..fd2b977858bd1550534916b1d886b60e101ef97d 100644 (file)
@@ -593,7 +593,8 @@ static int das08_attach(comedi_device *dev,comedi_devconfig *it)
                pci_iobase = pdev->base_address[1] & PCI_BASE_ADDRESS_IO_MASK;
                iobase = pdev->base_address[2] & PCI_BASE_ADDRESS_IO_MASK;
 #else
-               pci_enable_device(pdev);
+               if(pci_enable_device(pdev))
+                       return -EIO;
                pci_iobase = pdev->resource[1].start & PCI_BASE_ADDRESS_IO_MASK;
                iobase = pdev->resource[2].start & PCI_BASE_ADDRESS_IO_MASK;
 #endif