From patchwork Sat Feb 7 06:41:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 5986 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n176folM018831 for ; Sat, 7 Feb 2009 06:41:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752442AbZBGGlu (ORCPT ); Sat, 7 Feb 2009 01:41:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752584AbZBGGlu (ORCPT ); Sat, 7 Feb 2009 01:41:50 -0500 Received: from vms173005pub.verizon.net ([206.46.173.5]:17179 "EHLO vms173005pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbZBGGls (ORCPT ); Sat, 7 Feb 2009 01:41:48 -0500 Received: from localhost.localdomain ([96.237.168.40]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KEO00L68NXLZHV2@vms173005.mailsrvcs.net> for linux-acpi@vger.kernel.org; Sat, 07 Feb 2009 00:41:46 -0600 (CST) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id n176fihP009793; Sat, 07 Feb 2009 01:41:44 -0500 Received: (from lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) id n176fiC7009792; Sat, 07 Feb 2009 01:41:44 -0500 From: Len Brown To: linux-acpi@vger.kernel.org Cc: Roel Kluin , Len Brown Subject: [PATCH 04/30] panasonic-laptop: fix X[ ARRAY_SIZE(X) ] Date: Sat, 07 Feb 2009 01:41:12 -0500 Message-id: <2b190e76def5233c542f6025b4a133b1d4bd1a37.1233988822.git.len.brown@intel.com> X-Mailer: git-send-email 1.6.1.2.390.gba743 In-reply-to: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> References: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> In-reply-to: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> References: <091d71e023557136e96f0e54f301497a3fc95dc3.1233988822.git.len.brown@intel.com> Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Roel Kluin Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur. Signed-off-by: Roel Kluin Signed-off-by: Len Brown --- drivers/platform/x86/panasonic-laptop.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index f30db36..c47a44d 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -507,7 +507,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) hkey_num = result & 0xf; - if (hkey_num < 0 || hkey_num > ARRAY_SIZE(pcc->keymap)) { + if (hkey_num < 0 || hkey_num >= ARRAY_SIZE(pcc->keymap)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "hotkey number out of range: %d\n", hkey_num));