From patchwork Wed May 5 05:56:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 96982 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 o455ul0r027390 for ; Wed, 5 May 2010 05:56:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751504Ab0EEF4o (ORCPT ); Wed, 5 May 2010 01:56:44 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:48764 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827Ab0EEF4o (ORCPT ); Wed, 5 May 2010 01:56:44 -0400 Received: by fxm10 with SMTP id 10so3899104fxm.19 for ; Tue, 04 May 2010 22:56:42 -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=IPHS/7mpbJbZRagz+czOB1ioXk+aE8e14MK9kpZWX+Q=; b=F7E6JyS5BsyDo5pbYVVmICAPuMafhrkLbusc4fPZbn8PO4t3paYwLGHcZFg6UMGpdX 4ObUYXPUZZlk/worq9epdxLYPAB4X8MYyAJUtCK4ba5WkyZ+blqFmz/uQ9hgJhlO3kuO EBJcgRGeEzYjDeTFy0tj6YhyS4/ICVrKzrdgo= 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=dSFR85cMlcy4ZIjKn3F8ANKVC3BEpZFaPJlpA6+1nkOwID6+FyCf0nx5hTryZZX9YL Nf9/lK7csKi/g1vfPV1DkZDH/TTTsU6RAki3gZfIvFbAWOa4EGlZXSDb4GQDva0bs2yZ 6iwSUWep1zILSn1k/YTJk7f+CZj7qiAFSx5C0= Received: by 10.223.72.156 with SMTP id m28mr4948834faj.26.1273039002620; Tue, 04 May 2010 22:56:42 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id y15sm12842258fkd.8.2010.05.04.22.56.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 04 May 2010 22:56:42 -0700 (PDT) Date: Wed, 5 May 2010 07:56:24 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Subject: [patch -next] input: unlock on error paths Message-ID: <20100505055624.GB27064@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, 05 May 2010 05:56:47 +0000 (UTC) diff --git a/drivers/input/input.c b/drivers/input/input.c index e623edf..7c3fc5e 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -759,8 +759,9 @@ int input_set_keycode_big(struct input_dev *dev, if (!dev->setkeycode) goto out; - if (input_fetch_scancode(kt_entry, &scancode)) - return -EINVAL; + retval = input_fetch_scancode(kt_entry, &scancode); + if (retval) + goto out; retval = dev->getkeycode(dev, scancode, &old_keycode);