diff mbox

[media] bttv: call mutex_init() on newly allocated lock

Message ID 20101210033304.GX10623@bicker (mailing list archive)
State Superseded
Headers show

Commit Message

Dan Carpenter Dec. 10, 2010, 3:33 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index a529619..5620e20 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3302,6 +3302,7 @@  static int bttv_open(struct file *file)
 	 * Let's first copy btv->init at fh, holding cap.vb_lock, and then work
 	 * with the rest of init, holding btv->lock.
 	 */
+	mutex_init(&fh->cap.vb_lock);
 	mutex_lock(&fh->cap.vb_lock);
 	*fh = btv->init;
 	mutex_unlock(&fh->cap.vb_lock);