Check I/O region was allocated before releasing it.
authorIan Abbott <abbotti@mev.co.uk>
Mon, 7 Aug 2006 14:09:26 +0000 (14:09 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 7 Aug 2006 14:09:26 +0000 (14:09 +0000)
comedi/drivers/fl512.c

index 5cca26890bd9dd65503283e1af2047587620aca8..a9555f4a2d95171e454bbc91350235f894676254 100644 (file)
@@ -188,7 +188,7 @@ static int fl512_attach(comedi_device *dev,comedi_devconfig *it)
 
 static int fl512_detach(comedi_device *dev)
 {
-  release_region(dev->iobase,FL512_SIZE);
+  if (dev->iobase) release_region(dev->iobase,FL512_SIZE);
   printk("comedi%d: fl512: dummy i detach\n",dev->minor);
   return 0;
 }