From: Ian Abbott Date: Wed, 31 Oct 2007 14:40:24 +0000 (+0000) Subject: Check result of subdev_8255_init(). X-Git-Tag: v0_7_76~108 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=605f2dbfbb3b1126cdf41ba530c2b347ccf64e98;p=comedi.git Check result of subdev_8255_init(). --- diff --git a/comedi/drivers/amplc_pci230.c b/comedi/drivers/amplc_pci230.c index 3fd26d2c..adaebd6d 100644 --- a/comedi/drivers/amplc_pci230.c +++ b/comedi/drivers/amplc_pci230.c @@ -384,7 +384,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it) comedi_subdevice *s; unsigned long pci_iobase, iobase; /* PCI230's I/O spaces 1 and 2 respectively. */ struct pci_dev *pci_dev; - int i=0,irq_hdl; + int i=0,irq_hdl,rc; printk("comedi%d: amplc_pci230: attach %s %d,%d\n", dev->minor, thisboard->name, it->options[0], it->options[1]); @@ -562,7 +562,8 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it) s=dev->subdevices+2; /* digital i/o subdevice */ if(thisboard->have_dio){ - subdev_8255_init(dev,s,NULL,(devpriv->pci_iobase + PCI230_PPI_X_A)); + rc = subdev_8255_init(dev,s,NULL,(devpriv->pci_iobase + PCI230_PPI_X_A)); + if(rc < 0) return rc; }else{ s->type = COMEDI_SUBD_UNUSED; }