From patchwork Thu Nov 18 03:56:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 4952 Return-path: Envelope-to: mchehab@pedra Delivery-date: Thu, 18 Nov 2010 01:57:11 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1PIvcV-0001TX-7F for mchehab@pedra; Thu, 18 Nov 2010 01:57:11 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Thu, 18 Nov 2010 01:57:11 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PIvcF-0003qD-Fr; Thu, 18 Nov 2010 03:56:55 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752949Ab0KRD4x (ORCPT + 1 other); Wed, 17 Nov 2010 22:56:53 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:47511 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532Ab0KRD4w (ORCPT ); Wed, 17 Nov 2010 22:56:52 -0500 Received: by wyb28 with SMTP id 28so2766129wyb.19 for ; Wed, 17 Nov 2010 19:56:50 -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=+l3fLIfasq0U/6p8LeKzwREzRHqZTjl0F5pCleH+9UY=; b=I/WZg1Uw6U6Drz61oKf2fjEPhxbIezbiL2+OXupc1js5klEG+bbAE6YvXtW1L+nFEM WDKOm9YQXsNLbhZSFMzCjV9zEF8Y53knvOks4P4Q17Zv4futSEDm6GWZ+Tpv1aZbx8Wy 23qD8vUnHT/AO6UefX3+DPzR6LkXRL2jrosqE= 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=FldSbGdMgwK0uWCqQLjXoYHtCUZh1MVcbq5/xxBxC/73UDc6Y7SXMTQkO9+OVcEhP2 sDZ3QuyBfWItzngEU3Wj3kCJQeqWgEC2hPmalxHPQu+f/I8ayc3KiJ1TdQEey+fyN4Qr Y6FQdmDvm6WAxR8K4Ey3fh++QMfBo3YZxB2nU= Received: by 10.216.27.20 with SMTP id d20mr41818wea.99.1290052610294; Wed, 17 Nov 2010 19:56:50 -0800 (PST) Received: from bicker (h2db1.n1.ips.mtn.co.ug [41.210.173.177]) by mx.google.com with ESMTPS id x12sm1517886weq.18.2010.11.17.19.56.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Nov 2010 19:56:49 -0800 (PST) Date: Thu, 18 Nov 2010 06:56:37 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Devin Heitmueller , Sri Devi , Laurent Pinchart , Jarod Wilson , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] cx231xx: stray unlock on error path Message-ID: <20101118035637.GL31724@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: The lock isn't held here and doesn't need to be unlocked. The code has been like this since the driver was merged. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 56c2d81..b7b905f 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c @@ -731,16 +731,12 @@ static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev, retval = cx231xx_register_analog_devices(dev); if (retval < 0) { cx231xx_release_resources(dev); - goto fail_reg_devices; + return retval; } cx231xx_init_extension(dev); return 0; - -fail_reg_devices: - mutex_unlock(&dev->lock); - return retval; } #if defined(CONFIG_MODULES) && defined(MODULE)