Commit 4ae76422 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: me_daq: pass on the error from comedi_pci_enable()

Instead of returning -EIO when comedi_pci_enable() fails, pass on
the actual error code. Also, remove the kernel noise when the
function fails.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4bb153b4
...@@ -653,12 +653,9 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) ...@@ -653,12 +653,9 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
return -ENOMEM; return -ENOMEM;
dev->private = dev_private; dev->private = dev_private;
/* Enable PCI device and request PCI regions */ ret = comedi_pci_enable(pcidev, dev->board_name);
if (comedi_pci_enable(pcidev, dev->board_name) < 0) { if (ret)
dev_err(dev->class_dev, return ret;
"Failed to enable PCI device and request regions\n");
return -EIO;
}
dev->iobase = 1; /* detach needs this */ dev->iobase = 1; /* detach needs this */
/* Read PLX register base address [PCI_BASE_ADDRESS #0]. */ /* Read PLX register base address [PCI_BASE_ADDRESS #0]. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment