From patchwork Fri Dec 10 03:33:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 397242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBA3XLV9000565 for ; Fri, 10 Dec 2010 03:33:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793Ab0LJDdU (ORCPT ); Thu, 9 Dec 2010 22:33:20 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:39416 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754573Ab0LJDdU (ORCPT ); Thu, 9 Dec 2010 22:33:20 -0500 Received: by wwa36 with SMTP id 36so3241863wwa.1 for ; Thu, 09 Dec 2010 19:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=7b95I44JKRCoSevhiknU0DzGLE5jFexZq7PReMWQfaQ=; b=w97YobgCQNbAg22TO+nl2x9ixstQnxdp/wCLSpSULSKBvVzU4yfq82EDkkMcngufI7 cip+pD0Jdw51xXfh4vQdDeGhdrNMZN31rcQLo8HzoRQdZpvC2191vqFTDTAv5BazD2Dp wb+t3omtmavx5dTVXIOoOkYIp6QRaeMs/x6DY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=mxGWMsPxOvkW0RNe+NBThwJ2tNXr1UaJGTS2PlInJSUzHdkuyKZOZriL8HTCM86GhI Oo0QGPHY7sdvlFidF3gyn1izExFlgMj37lp45E1Y8iYlN//+YyvFFq+qkw29jXeMWZWi UpEujfGyx18jEfijTWGJB5WyXsbOCMQAS/5RM= Received: by 10.216.180.201 with SMTP id j51mr320199wem.74.1291951997002; Thu, 09 Dec 2010 19:33:17 -0800 (PST) Received: from bicker (h2d08.n1.ips.mtn.co.ug [41.210.173.8]) by mx.google.com with ESMTPS id x3sm1232657wes.22.2010.12.09.19.33.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 19:33:15 -0800 (PST) Date: Fri, 10 Dec 2010 06:33:04 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, pupykin.s@gmail.com Subject: [patch] [media] bttv: call mutex_init() on newly allocated lock Message-ID: <20101210033304.GX10623@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 03:33:22 +0000 (UTC) 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);