Commit f2a64902 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 06183026
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -346,7 +346,9 @@ static void dyna_pci10xx_detach(struct comedi_device *dev)
	if (devpriv)
		mutex_destroy(&devpriv->mutex);
	if (pcidev) {
		if (dev->iobase)
			comedi_pci_disable(pcidev);
		pci_dev_put(pcidev);
	}
}