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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return -ENOMEM;
dev->private = dev_private;
- /* Enable PCI device and request PCI regions */
- if (comedi_pci_enable(pcidev, dev->board_name) < 0) {
- dev_err(dev->class_dev,
- "Failed to enable PCI device and request regions\n");
- return -EIO;
- }
+ ret = comedi_pci_enable(pcidev, dev->board_name);
+ if (ret)
+ return ret;
dev->iobase = 1; /* detach needs this */
/* Read PLX register base address [PCI_BASE_ADDRESS #0]. */