From 605f2dbfbb3b1126cdf41ba530c2b347ccf64e98 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 31 Oct 2007 14:40:24 +0000 Subject: [PATCH] Check result of subdev_8255_init(). --- comedi/drivers/amplc_pci230.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.26.2