diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-04 09:28:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-04 09:28:25 -0300 |
commit | e465ad8685774c7c9a2cf71e9d196b7aaa8cae35 (patch) | |
tree | b1f83dd9bf6f9447f4f1491b6974315b5bc99ee9 /linux/drivers/media/video/em28xx/em28xx-video.c | |
parent | 4be14b5602f1f21b6e2a436f240a12797888ae48 (diff) | |
parent | c8b5c505811fd4797e0ea35bcc60478d626a0971 (diff) | |
download | mediapointer-dvb-s2-e465ad8685774c7c9a2cf71e9d196b7aaa8cae35.tar.gz mediapointer-dvb-s2-e465ad8685774c7c9a2cf71e9d196b7aaa8cae35.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-bkl
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 81d942e39..c9a2d4808 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1555,6 +1555,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) struct em28xx_fh *fh; enum v4l2_buf_type fh_type = 0; + lock_kernel(); list_for_each_entry(h, &em28xx_devlist, devlist) { if (h->vdev->minor == minor) { dev = h; @@ -1570,8 +1571,10 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) dev = h; } } - if (NULL == dev) + if (NULL == dev) { + unlock_kernel(); return -ENODEV; + } em28xx_videodbg("open minor=%d type=%s users=%d\n", minor, v4l2_type_names[fh_type], dev->users); @@ -1587,6 +1590,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL); if (!fh) { em28xx_errdev("em28xx-video.c: Out of memory?!\n"); + unlock_kernel(); return -ENOMEM; } mutex_lock(&dev->lock); @@ -1630,6 +1634,7 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) sizeof(struct em28xx_buffer), fh); mutex_unlock(&dev->lock); + unlock_kernel(); return errCode; } |