]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
panasonic-laptop: fix X[ ARRAY_SIZE(X) ]
authorRoel Kluin <roel.kluin@gmail.com>
Sat, 17 Jan 2009 14:51:27 +0000 (15:51 +0100)
committerLen Brown <len.brown@intel.com>
Sun, 18 Jan 2009 01:20:13 +0000 (20:20 -0500)
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>
drivers/platform/x86/panasonic-laptop.c

index f30db367c82eed36540b9db55f7e6b9abb72267b..c47a44dcb702abf97f52ce86fec941a9f5a17318 100644 (file)
@@ -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));