staging: comedi: dyna_pci10xx: fix detach
The detach for this driver is missing the check to make sure that the pci device is enabled before disabling it. It's also missing the pci_dev_put(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
06183026d8
commit
f2a64902e3
|
@ -346,7 +346,9 @@ static void dyna_pci10xx_detach(struct comedi_device *dev)
|
|||
if (devpriv)
|
||||
mutex_destroy(&devpriv->mutex);
|
||||
if (pcidev) {
|
||||
comedi_pci_disable(pcidev);
|
||||
if (dev->iobase)
|
||||
comedi_pci_disable(pcidev);
|
||||
pci_dev_put(pcidev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue