Skip to content

Commit

Permalink
staging: comedi: dyna_pci10xx: fix detach
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 19, 2012
1 parent 0618302 commit f2a6490
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/comedi/drivers/dyna_pci10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f2a6490

Please sign in to comment.