summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2007-11-19 19:10:48 +0100
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-12-11 21:08:12 +0100
commit820eacd84cff23b76693f4be1e28feb672f4488f (patch)
treeb6bd6702ae3d13ae9043bbf54034b1925bc7b927 /drivers/media/common/saa7146_video.c
parentV4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stop (diff)
downloadlinux-820eacd84cff23b76693f4be1e28feb672f4488f.tar.xz
linux-820eacd84cff23b76693f4be1e28feb672f4488f.zip
V4L/DVB (6615): V4L: Fix VIDIOCGMBUF locking in saa7146
Fallout from videobuf_mmap_setup() locking fixes. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/saa7146_video.c')
-rw-r--r--drivers/media/common/saa7146_video.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 7cc4213ba56b..ae36d101006b 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1205,13 +1205,10 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
DEB_D(("VIDIOCGMBUF \n"));
q = &fh->video_q;
- mutex_lock(&q->lock);
err = videobuf_mmap_setup(q,gbuffers,gbufsize,
V4L2_MEMORY_MMAP);
- if (err < 0) {
- mutex_unlock(&q->lock);
+ if (err < 0)
return err;
- }
gbuffers = err;
memset(mbuf,0,sizeof(*mbuf));
@@ -1219,7 +1216,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
mbuf->size = gbuffers * gbufsize;
for (i = 0; i < gbuffers; i++)
mbuf->offsets[i] = i * gbufsize;
- mutex_unlock(&q->lock);
return 0;
}
#endif