aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 8ba8daafd7ea..65c8af18e767 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -898,9 +898,11 @@ static int vivi_open(struct inode *inode, struct file *file)
898 898
899 printk(KERN_DEBUG "vivi: open called (minor=%d)\n", minor); 899 printk(KERN_DEBUG "vivi: open called (minor=%d)\n", minor);
900 900
901 lock_kernel();
901 list_for_each_entry(dev, &vivi_devlist, vivi_devlist) 902 list_for_each_entry(dev, &vivi_devlist, vivi_devlist)
902 if (dev->vfd->minor == minor) 903 if (dev->vfd->minor == minor)
903 goto found; 904 goto found;
905 unlock_kernel();
904 return -ENODEV; 906 return -ENODEV;
905 907
906found: 908found:
@@ -925,8 +927,10 @@ found:
925 } 927 }
926unlock: 928unlock:
927 mutex_unlock(&dev->mutex); 929 mutex_unlock(&dev->mutex);
928 if (retval) 930 if (retval) {
931 unlock_kernel();
929 return retval; 932 return retval;
933 }
930 934
931 file->private_data = fh; 935 file->private_data = fh;
932 fh->dev = dev; 936 fh->dev = dev;
@@ -955,6 +959,7 @@ unlock:
955 sizeof(struct vivi_buffer), fh); 959 sizeof(struct vivi_buffer), fh);
956 960
957 vivi_start_thread(fh); 961 vivi_start_thread(fh);
962 unlock_kernel();
958 963
959 return 0; 964 return 0;
960} 965}