aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/devio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index de17738f3acb..9218cca21043 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -565,6 +565,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
565 struct dev_state *ps; 565 struct dev_state *ps;
566 int ret; 566 int ret;
567 567
568 lock_kernel();
568 /* Protect against simultaneous removal or release */ 569 /* Protect against simultaneous removal or release */
569 mutex_lock(&usbfs_mutex); 570 mutex_lock(&usbfs_mutex);
570 571
@@ -611,6 +612,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
611 if (ret) 612 if (ret)
612 kfree(ps); 613 kfree(ps);
613 mutex_unlock(&usbfs_mutex); 614 mutex_unlock(&usbfs_mutex);
615 unlock_kernel();
614 return ret; 616 return ret;
615} 617}
616 618