diff options
Diffstat (limited to 'drivers/media/video/se401.c')
-rw-r--r-- | drivers/media/video/se401.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index acceed5..d16bbf0 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c @@ -936,14 +936,18 @@ static int se401_open(struct inode *inode, struct file *file) struct usb_se401 *se401 = (struct usb_se401 *)dev; int err = 0; - if (se401->user) + lock_kernel(); + if (se401->user) { + unlock_kernel(); return -EBUSY; + } se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES); if (se401->fbuf) file->private_data = dev; else err = -ENOMEM; se401->user = !err; + unlock_kernel(); return err; } |