* [patch] [media] bt8xx: missing unlock in bttv_overlay()
@ 2010-11-18 3:55 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-11-18 3:55 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, kernel-janitors
There is a missing unlock here. This was introduced as part of BKL
removal in c37db91fd0d4 "V4L/DVB: bttv: fix driver lock and remove
explicit calls to BKL"
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 3da6e80..aca755c 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -2779,16 +2779,14 @@ static int bttv_overlay(struct file *file, void *f, unsigned int on)
mutex_lock(&fh->cap.vb_lock);
/* verify args */
if (unlikely(!btv->fbuf.base)) {
- mutex_unlock(&fh->cap.vb_lock);
- return -EINVAL;
- }
- if (unlikely(!fh->ov.setup_ok)) {
+ retval = -EINVAL;
+ } else if (unlikely(!fh->ov.setup_ok)) {
dprintk("bttv%d: overlay: !setup_ok\n", btv->c.nr);
retval = -EINVAL;
}
+ mutex_unlock(&fh->cap.vb_lock);
if (retval)
return retval;
- mutex_unlock(&fh->cap.vb_lock);
}
if (!check_alloc_btres_lock(btv, fh, RESOURCE_OVERLAY))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-18 3:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-18 3:55 [patch] [media] bt8xx: missing unlock in bttv_overlay() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox