Skip to content

Commit

Permalink
staging: comedi: me_daq: pass on the error from comedi_pci_enable()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 26, 2012
1 parent 4bb153b commit 4ae7642
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/staging/comedi/drivers/me_daq.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,9 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
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]. */
Expand Down

0 comments on commit 4ae7642

Please sign in to comment.