Add mutex_destroy() call to driver detach callback
Signed-off-by: Prashant P. Shah <[email protected]>
---
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 d8821b9..b561a43 100644
--- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
+++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
@@ -410,8 +410,10 @@ found:
static int dyna_pci10xx_detach(struct comedi_device *dev)
{
- if (devpriv && devpriv->pci_dev)
+ if (devpriv && devpriv->pci_dev) {
comedi_pci_disable(devpriv->pci_dev);
+ mutex_destroy(&devpriv->mutex);
+ }
return 0;
}
--
1.7.1