From 4ae76422338f25ee4907e92ae3cdc968fdd9b578 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 25 Oct 2012 15:06:37 -0700 Subject: [PATCH] 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: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me_daq.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index aedc5092808..95fbecc4929 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -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]. */ -- 2.20.1