summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-01-17 15:51:27 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-12 09:50:33 -0800
commitec778e2c921546e55e914033b3fe112b33708381 (patch)
tree59adcf1b137c4560b3c17f96c96830259f07f398
parentc30a0b087efa03642c639d4a485991d6b7454338 (diff)
panasonic-laptop: fix X[ ARRAY_SIZE(X) ]
commit 2b190e76def5233c542f6025b4a133b1d4bd1a37 upstream. Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/misc/panasonic-laptop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/panasonic-laptop.c b/drivers/misc/panasonic-laptop.c
index 4a1bc64485d5..d82d1cc9bd8d 100644
--- a/drivers/misc/panasonic-laptop.c
+++ b/drivers/misc/panasonic-laptop.c
@@ -515,7 +515,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));