From patchwork Wed Nov 17 05:12:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 330981 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 oAH5CrML007034 for ; Wed, 17 Nov 2010 05:12:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270Ab0KQFMu (ORCPT ); Wed, 17 Nov 2010 00:12:50 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:43833 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813Ab0KQFMt (ORCPT ); Wed, 17 Nov 2010 00:12:49 -0500 Received: by wyb28 with SMTP id 28so1584416wyb.19 for ; Tue, 16 Nov 2010 21:12:48 -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=RUuacivzpQSXL1ahPs+1SGBMKYAIc7FO29TPwqFJgLs=; b=v9VYkEtZLmB1TJ+GsYpYHpGtE5XVxwm/hFUULAX9w5SLJCjfvxTUkqs4qQ1sTiDyEQ bb5xjxkztLaT/4xAaVJ0CPSQJpCC11mQ3+iRP7DHbtikLbrmEAjJ1zA0Lbs1a6pmgym6 jgF+qO0ypyUP6XFicYyXtAYuB/q9xai1lZXWQ= 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=mB3QESXH1biwekqarw5KcQUNv+/M516jYlr1rkRxDeCYNvAs1m9uzxwoKENK6wwa1A +j+gUBP2zRnnp8Q2Rr7zprzukh1rOl5a5O+VoIW2hH/jA6Ceyhcf3o4lho56mgqFHDFL LIGlmgD8eUGWwMUvEi4bSyDCN+ZG/imWxqpEU= Received: by 10.216.177.201 with SMTP id d51mr5204692wem.80.1289970767761; Tue, 16 Nov 2010 21:12:47 -0800 (PST) Received: from bicker (h14ba.n2.ips.mtn.co.ug [212.88.116.186]) by mx.google.com with ESMTPS id e12sm938801wer.12.2010.11.16.21.12.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Nov 2010 21:12:46 -0800 (PST) Date: Wed, 17 Nov 2010 08:12:23 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Jarod Wilson , Zimny Lech , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 1/3] [media] lirc_dev: stray unlock in lirc_dev_fop_poll() Message-ID: <20101117051223.GD31724@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]); Wed, 17 Nov 2010 05:12:53 +0000 (UTC) diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 8418b14..8ab9d87 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -522,10 +522,8 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) dev_dbg(ir->d.dev, LOGHEAD "poll called\n", ir->d.name, ir->d.minor); - if (!ir->attached) { - mutex_unlock(&ir->irctl_lock); + if (!ir->attached) return POLLERR; - } poll_wait(file, &ir->buf->wait_poll, wait);