From 37fa328f066dc38bf58337b6488232c8cefe37f3 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Thu, 7 Feb 2013 13:27:10 -0700 Subject: [PATCH] staging: comedi: ni_daq_dio24: add back missing 'if (ret)' The 'if (ret)' after calling comedi_pcmcia_enable() was accidentally removed in: Commit: 573a964882065f9b2cb71db8a225ba067b4b5b7a staging: comedi: ni_daq_dio24: use comedi_pcmcia_{enable,disable} Put if back so that dio24_auto_attach() can finish attaching to the board after enabling the pcmcia device. Signed-off-by: H Hartley Sweeten Reported-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_daq_dio24.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 32ee22dbb858..e1cc9d01f200 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -56,6 +56,7 @@ static int dio24_auto_attach(struct comedi_device *dev, link->config_flags |= CONF_AUTO_SET_IO; ret = comedi_pcmcia_enable(dev, NULL); + if (ret) return ret; dev->iobase = link->resource[0]->start; -- 2.30.2