From patchwork Wed Apr 7 09:21:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 90986 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o379LIVU007767 for ; Wed, 7 Apr 2010 09:21:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757542Ab0DGJVP (ORCPT ); Wed, 7 Apr 2010 05:21:15 -0400 Received: from mail-fx0-f223.google.com ([209.85.220.223]:47852 "EHLO mail-fx0-f223.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478Ab0DGJVM (ORCPT ); Wed, 7 Apr 2010 05:21:12 -0400 Received: by fxm23 with SMTP id 23so770941fxm.21 for ; Wed, 07 Apr 2010 02:21:11 -0700 (PDT) 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=sZQZZXRYV75hGIOkvV8G+83lv6f6pnJgRyRAloYMqWE=; b=OkebRbPe7HzLRBeLAUFIN7svCziMvAZcIA/+/6QEz0BDllFV4DoOUkbFQZfkvm7ESK 6uR2NwaeJDbDFPZUbE34wWoS5B0iepzyj9/rysDw2kDwOzvBJ7YpRJRYxl/tcKOra7Li lyx16MrzNaiQFGpQyI+YDDdwHRm/ZraN2aO4Y= 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=d3w10S0EkhRXZkptgG14zyj2ohlLz/VDNAKli7oWuChVTRBlq8BDjLdOVnSxtjTJnM Q2/z9xpa9n13a1sXbazvrWpY4UwQVtphOBXllPIGJi4NyDcWcaLOKuD2uVdKxMNpH8hu Uf+0dSoTsYtNdC+VF4HXslJE1emuo8JygtzD4= Received: by 10.103.4.14 with SMTP id g14mr4644636mui.84.1270632070822; Wed, 07 Apr 2010 02:21:10 -0700 (PDT) Received: from bicker ([196.43.68.50]) by mx.google.com with ESMTPS id 23sm6369680mun.7.2010.04.07.02.21.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Apr 2010 02:21:10 -0700 (PDT) Date: Wed, 7 Apr 2010 12:21:05 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Hans Verkuil , Vaibhav Hiremath , Laurent Pinchart , Muralidharan Karicheri , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] davinci: don't return under lock on error path Message-ID: <20100407092105.GC5157@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 (demeter.kernel.org [140.211.167.41]); Wed, 07 Apr 2010 09:21:18 +0000 (UTC) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 7cf042f..5c83f90 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -1824,7 +1824,6 @@ static __init int vpfe_probe(struct platform_device *pdev) goto probe_free_dev_mem; } - mutex_lock(&ccdc_lock); /* Allocate memory for ccdc configuration */ ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL); if (NULL == ccdc_cfg) { @@ -1833,6 +1832,8 @@ static __init int vpfe_probe(struct platform_device *pdev) goto probe_free_dev_mem; } + mutex_lock(&ccdc_lock); + strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); /* Get VINT0 irq resource */ res1 = platform_get_resource(pdev, IORESOURCE_IRQ, 0);