aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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
1205 DEB_D(("VIDIOCGMBUF \n")); 1205 DEB_D(("VIDIOCGMBUF \n"));
1206 1206
1207 q = &fh->video_q; 1207 q = &fh->video_q;
1208 mutex_lock(&q->lock);
1209 err = videobuf_mmap_setup(q,gbuffers,gbufsize, 1208 err = videobuf_mmap_setup(q,gbuffers,gbufsize,
1210 V4L2_MEMORY_MMAP); 1209 V4L2_MEMORY_MMAP);
1211 if (err < 0) { 1210 if (err < 0)
1212 mutex_unlock(&q->lock);
1213 return err; 1211 return err;
1214 }
1215 1212
1216 gbuffers = err; 1213 gbuffers = err;
1217 memset(mbuf,0,sizeof(*mbuf)); 1214 memset(mbuf,0,sizeof(*mbuf));
@@ -1219,7 +1216,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
1219 mbuf->size = gbuffers * gbufsize; 1216 mbuf->size = gbuffers * gbufsize;
1220 for (i = 0; i < gbuffers; i++) 1217 for (i = 0; i < gbuffers; i++)
1221 mbuf->offsets[i] = i * gbufsize; 1218 mbuf->offsets[i] = i * gbufsize;
1222 mutex_unlock(&q->lock);
1223 return 0; 1219 return 0;
1224 } 1220 }
1225#endif 1221#endif