|
@@ -672,12 +672,13 @@ static void pcmuio_detach(struct comedi_device *dev)
|
|
struct pcmuio_private *devpriv = dev->private;
|
|
struct pcmuio_private *devpriv = dev->private;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- for (i = 0; i < PCMUIO_MAX_ASICS; ++i) {
|
|
|
|
- if (devpriv->asics[i].irq)
|
|
|
|
- free_irq(devpriv->asics[i].irq, dev);
|
|
|
|
- }
|
|
|
|
- if (devpriv && devpriv->sprivs)
|
|
|
|
|
|
+ if (devpriv) {
|
|
|
|
+ for (i = 0; i < PCMUIO_MAX_ASICS; ++i) {
|
|
|
|
+ if (devpriv->asics[i].irq)
|
|
|
|
+ free_irq(devpriv->asics[i].irq, dev);
|
|
|
|
+ }
|
|
kfree(devpriv->sprivs);
|
|
kfree(devpriv->sprivs);
|
|
|
|
+ }
|
|
comedi_legacy_detach(dev);
|
|
comedi_legacy_detach(dev);
|
|
}
|
|
}
|
|
|
|
|