From patchwork Sun Dec 12 13:15:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Young X-Patchwork-Id: 400772 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 oBCDGOMb016005 for ; Sun, 12 Dec 2010 13:16:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752168Ab0LLNP7 (ORCPT ); Sun, 12 Dec 2010 08:15:59 -0500 Received: from mail-pv0-f174.google.com ([74.125.83.174]:45996 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131Ab0LLNP7 (ORCPT ); Sun, 12 Dec 2010 08:15:59 -0500 Received: by pva4 with SMTP id 4so969322pva.19 for ; Sun, 12 Dec 2010 05:15:58 -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:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=Mm2zPQ6aoS0VoUpYimOuOAZxSpGUMLpXZZU3Zlfp7Ak=; b=CuiJsjR6g/S4xkoU9GIuzq60aIP2bsGPe0H/00sO2bPQxf30K+CtIvqSdTrshzIjP+ 7SSJeFgyeGioueXHmgKVNnVcukQmnAcP5agL/BU6nJOfR6Isf0RP+yOsJlC4mn4K53hD qmOkcWj8v6W6WN5fA7kcCjJ9siyMU6Rok8Dzw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=JS4aRhyV+cPrgMgl4CWMWlYjPLiJC7AxXswe25ltZ2sI+tfjYg1s6TQS6PHQSfj1gg 4ja87iYFPHb/51ITOihdduTfYsc6HgKFD8VUEH4z25QcE+37x7nzQl+mTjhSVspURVX9 GGSddKxe1Hux0bOvDHAzOJig++/wP5jpmkIHI= Received: by 10.142.13.2 with SMTP id 2mr2225086wfm.370.1292159758665; Sun, 12 Dec 2010 05:15:58 -0800 (PST) Received: from darkstar ([114.240.76.24]) by mx.google.com with ESMTPS id x18sm7315821wfa.11.2010.12.12.05.15.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 12 Dec 2010 05:15:57 -0800 (PST) Date: Sun, 12 Dec 2010 21:15:50 +0800 From: Dave Young To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Guennadi Liakhovetski , Chris Clayton Subject: [PATCH] bttv: fix mutex use before init Message-ID: <20101212131550.GA2608@darkstar> 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]); Sun, 12 Dec 2010 13:16:24 +0000 (UTC) --- linux-2.6.orig/drivers/media/video/bt8xx/bttv-driver.c 2010-11-27 11:21:30.000000000 +0800 +++ linux-2.6/drivers/media/video/bt8xx/bttv-driver.c 2010-12-12 16:31:39.633333338 +0800 @@ -3291,6 +3291,8 @@ static int bttv_open(struct file *file) fh = kmalloc(sizeof(*fh), GFP_KERNEL); if (unlikely(!fh)) return -ENOMEM; + + mutex_init(&fh->cap.vb_lock); file->private_data = fh; /*