From: Frank Mori Hess Date: Thu, 9 Aug 2001 23:37:09 +0000 (+0000) Subject: took into account possibility of pci_enable_device() failing X-Git-Tag: r0_7_61~192 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a27bb64b3f4d07bb697c2193cd3c30b0f38fae88;p=comedi.git took into account possibility of pci_enable_device() failing --- diff --git a/comedi/drivers/cb_pcidda.c b/comedi/drivers/cb_pcidda.c index 1f4d798d..40e9e9f4 100644 --- a/comedi/drivers/cb_pcidda.c +++ b/comedi/drivers/cb_pcidda.c @@ -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; diff --git a/comedi/drivers/das08.c b/comedi/drivers/das08.c index 7d008a63..fd2b9778 100644 --- a/comedi/drivers/das08.c +++ b/comedi/drivers/das08.c @@ -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