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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>
CC: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Yuanhan Liu <yuanhan.liu@xxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/jr3_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index 4a108ea..3851572 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -821,7 +821,7 @@ static int jr3_pci_attach(struct comedi_device *dev,
 
 	result = comedi_pci_enable(card, "jr3_pci");
 	if (result < 0)
-		return -EIO;
+		return result;
 
 	devpriv->pci_enabled = 1;
 	devpriv->iobase = ioremap(pci_resource_start(card, 0),
-- 
1.7.7.6

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux