diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-07-19 02:01:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 23:51:38 (GMT) |
commit | f2a64902e3c2ffa34b52e6ad13e8e3c40f6919c7 (patch) | |
tree | 332b64b497083500adb6dee97e68b0b51fbd871a /drivers/staging | |
parent | 06183026d82cf58cdfba53b661914faf3c414029 (diff) | |
download | linux-fsl-qoriq-f2a64902e3c2ffa34b52e6ad13e8e3c40f6919c7.tar.xz |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/dyna_pci10xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 6821f87..064be9a 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -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); } } |