Browse Source

staging: comedi: jr3_pci: return 'result' from comedi_pci_enable instead of -EIO

Fix a smatch warning:
drivers/staging/comedi/drivers/jr3_pci.c:793 jr3_pci_auto_attach() info: why not propagate 'result' from comedi_pci_enable() instead of -5?

CC: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yuanhan Liu 13 years ago
parent
commit
4ecd6228ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/comedi/drivers/jr3_pci.c

+ 1 - 1
drivers/staging/comedi/drivers/jr3_pci.c

@@ -703,7 +703,7 @@ static int __devinit jr3_pci_auto_attach(struct comedi_device *dev,
 
 	result = comedi_pci_enable(pcidev, "jr3_pci");
 	if (result < 0)
-		return -EIO;
+		return result;
 
 	dev->iobase = 1;	/* the "detach" needs this */
 	devpriv->iobase = ioremap(pci_resource_start(pcidev, 0),