Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100320
b: refs/heads/master
c: 6606470
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent ecf9cbe commit 187ff08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5b4aa67da65aeb58718e0a39158b293873ac572
refs/heads/master: 6606470dd1d628878383c96d10b52a77986ddac7
4 changes: 4 additions & 0 deletions trunk/drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/system.h>

Expand Down Expand Up @@ -496,6 +497,7 @@ static int video_open(struct inode *inode, struct file *file)

if(minor>=VIDEO_NUM_DEVICES)
return -ENODEV;
lock_kernel();
mutex_lock(&videodev_lock);
vfl=video_device[minor];
if(vfl==NULL) {
Expand All @@ -505,6 +507,7 @@ static int video_open(struct inode *inode, struct file *file)
vfl=video_device[minor];
if (vfl==NULL) {
mutex_unlock(&videodev_lock);
unlock_kernel();
return -ENODEV;
}
}
Expand All @@ -518,6 +521,7 @@ static int video_open(struct inode *inode, struct file *file)
}
fops_put(old_fops);
mutex_unlock(&videodev_lock);
unlock_kernel();
return err;
}

Expand Down

0 comments on commit 187ff08

Please sign in to comment.