aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/misc/auerswald.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 88fb56d5db8f..cac1500cba62 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1822,16 +1822,10 @@ static int auerchar_release (struct inode *inode, struct file *file)
1822 pauerswald_t cp; 1822 pauerswald_t cp;
1823 dbg("release"); 1823 dbg("release");
1824 1824
1825 /* get the mutexes */ 1825 down(&ccp->mutex);
1826 if (down_interruptible (&ccp->mutex)) {
1827 return -ERESTARTSYS;
1828 }
1829 cp = ccp->auerdev; 1826 cp = ccp->auerdev;
1830 if (cp) { 1827 if (cp) {
1831 if (down_interruptible (&cp->mutex)) { 1828 down(&cp->mutex);
1832 up (&ccp->mutex);
1833 return -ERESTARTSYS;
1834 }
1835 /* remove an open service */ 1829 /* remove an open service */
1836 auerswald_removeservice (cp, &ccp->scontext); 1830 auerswald_removeservice (cp, &ccp->scontext);
1837 /* detach from device */ 1831 /* detach from device */