From patchwork Mon Jul 19 19:59:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 3825 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Mon, 19 Jul 2010 20:08:09 +0000 Received: from bombadil.infradead.org [18.85.46.34] by localhost with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 19 Jul 2010 22:29:51 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OawdF-0000Am-FU; Mon, 19 Jul 2010 20:08:09 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966670Ab0GSUIG (ORCPT + 1 other); Mon, 19 Jul 2010 16:08:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35998 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966644Ab0GSUIE (ORCPT ); Mon, 19 Jul 2010 16:08:04 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6JK83mk026215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Jul 2010 16:08:04 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6JK83Rw017726; Mon, 19 Jul 2010 16:08:03 -0400 Received: by xavier.bos.redhat.com (Postfix, from userid 501) id AD07821D59; Mon, 19 Jul 2010 15:59:12 -0400 (EDT) Date: Mon, 19 Jul 2010 15:59:12 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: linux-input@vger.kernel.org, kmcmartin@redhat.com Subject: [PATCH] input: fix uninitialized old_keycode oops in input_set_keycode Message-ID: <20100719195912.GC31837@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Patch as suggested by Kyle McMartin, in response to Red Hat bugzilla 615707, filed against a rawhide kernel carrying ir-core enabling patches from the linuxtv staging/other tree. Fix is based on the similar logic in input_set_keycode_big, and is confirmed by the bz reporter. CC: Kyle McMartin Signed-off-by: Jarod Wilson --- drivers/input/input.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index ce5d90d..0c71977 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -900,6 +900,7 @@ int input_set_keycode(struct input_dev *dev, if (retval) goto out; + old_keycode = kt_entry.keycode; kt_entry.keycode = keycode; retval = dev->setkeycodebig(dev, &kt_entry);