bt8xx: missing unlock in bttv_overlay()
Subsystems (2)
PATCH 1/1 bt8xx: missing unlock in bttv_overlay()
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 <[email protected]>
drivers/media/video/bt8xx/bttv-driver.c +3 -5
@@ -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 ))