]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: jr3_pci: return 'result' from comedi_pci_enable instead of -EIO
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 5 Nov 2012 05:19:40 +0000 (13:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:16:01 +0000 (11:16 -0800)
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>
drivers/staging/comedi/drivers/jr3_pci.c

index 364541d0f472f5ae45f4061c5bd3144ed19eff6b..69f151d62f3bc252c4a44fb2c97ad59643d9b47f 100644 (file)
@@ -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),