From: Ian Abbott Date: Mon, 7 Aug 2006 15:52:03 +0000 (+0000) Subject: Don't free the IRQ if it wasn't allocated. X-Git-Tag: r0_7_72~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad3f7438375c800c27c531ad9beb51663b28f53a;p=comedi.git Don't free the IRQ if it wasn't allocated. --- diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index dcf113c0..97e01f85 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -451,6 +451,7 @@ static void mio_cs_config(dev_link_t *link) static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it) { dev_link_t *link; + int irq; int ret; DPRINTK("mio_cs_attach(dev=%p,it=%p)\n",dev,it); @@ -461,11 +462,11 @@ static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it) dev->driver=&driver_ni_mio_cs; dev->iobase=link->io.BasePort1; - dev->irq=link->irq.AssignedIRQ; + irq=link->irq.AssignedIRQ; printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %d, ", dev->minor,dev->driver->driver_name,dev->iobase, - dev->irq); + irq); #if 0 { @@ -493,6 +494,7 @@ static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it) printk(" irq not available\n"); return -EINVAL; } + dev->irq = irq; /* allocate private area */ if((ret=ni_alloc_private(dev))<0)