From 4ecd6228acc8c3bb5c7d18bae57ce13685936e6d Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Mon, 5 Nov 2012 13:19:40 +0800 Subject: [PATCH] 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 Signed-off-by: Yuanhan Liu Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 364541d0f472..69f151d62f3b 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/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), -- 2.39.5