From patchwork Mon Jul 26 16:21:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 114311 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6QGKtxu020311 for ; Mon, 26 Jul 2010 16:21:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013Ab0GZQVc (ORCPT ); Mon, 26 Jul 2010 12:21:32 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:63766 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858Ab0GZQVb (ORCPT ); Mon, 26 Jul 2010 12:21:31 -0400 Received: by bwz1 with SMTP id 1so2879906bwz.19 for ; Mon, 26 Jul 2010 09:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=leqTP1y1y0yAX35VqWQ0GgjSxoLq4PWLs/+Oev1yC28=; b=gTXhapjzKX8+9K4F8ZOY9lIKjsA7cc1a+HA0tKGrfD5M3kSe7tSvLG2Cb1N+6Xw2m6 sHIJuOCErqyNKJ6g6fxM7Mqjf6jRUDXWxnSL7+QeTVRgrUmjhQZixoeOWbx97oc8qdxz Si0Dljq6uZXKV8HkQzDtcvPoAo1ZBiy/jrfek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=rhPJsDaI4RBjcaCESNkefTcUJUOrZcbl2B7FNVAgJf092h8q3J+R1XobYcuNwPLbm8 xypc7O6V3rWKjqln33wuE9F1pXN//4k6qetNhD4cnCiluZAnkJaVKKxOaYthor84wZgP j8JatF2A21LFpxACWtsXMzpFcLbBZaoyHVaGU= Received: by 10.204.126.92 with SMTP id b28mr5798103bks.47.1280161290016; Mon, 26 Jul 2010 09:21:30 -0700 (PDT) Received: from [10.0.0.2] (87.68.75.57.cable.012.net.il [87.68.75.57]) by mx.google.com with ESMTPS id a9sm2999774bky.11.2010.07.26.09.21.26 (version=SSLv3 cipher=RC4-MD5); Mon, 26 Jul 2010 09:21:27 -0700 (PDT) Subject: [PATCH] INPUT: fix crash on setkeycode From: Maxim Levitsky To: linux-input Cc: Jarod Wilson Date: Mon, 26 Jul 2010 19:21:18 +0300 Message-ID: <1280161278.3492.7.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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]); Mon, 26 Jul 2010 16:21:33 +0000 (UTC) diff --git a/drivers/input/input.c b/drivers/input/input.c index 43aeb71..ce5d90d 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1850,7 +1850,7 @@ int input_register_device(struct input_dev *dev) dev->getkeycodebig_from_scancode = input_default_getkeycode_from_scancode; } - if (dev->setkeycode) { + if (!dev->setkeycode) { if (!dev->setkeycodebig) dev->setkeycodebig = input_default_setkeycode; }