Fallout from videobuf_mmap_setup() locking fixes.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
DEB_D(("VIDIOCGMBUF \n"));
q = &fh->video_q;
DEB_D(("VIDIOCGMBUF \n"));
q = &fh->video_q;
err = videobuf_mmap_setup(q,gbuffers,gbufsize,
V4L2_MEMORY_MMAP);
err = videobuf_mmap_setup(q,gbuffers,gbufsize,
V4L2_MEMORY_MMAP);
- if (err < 0) {
- mutex_unlock(&q->lock);
gbuffers = err;
memset(mbuf,0,sizeof(*mbuf));
gbuffers = err;
memset(mbuf,0,sizeof(*mbuf));
mbuf->size = gbuffers * gbufsize;
for (i = 0; i < gbuffers; i++)
mbuf->offsets[i] = i * gbufsize;
mbuf->size = gbuffers * gbufsize;
for (i = 0; i < gbuffers; i++)
mbuf->offsets[i] = i * gbufsize;
- mutex_unlock(&q->lock);