Skip to content

Commit

Permalink
panasonic-laptop: fix X[ ARRAY_SIZE(X) ]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Len Brown committed Jan 18, 2009
1 parent 5d8b532 commit 2b190e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/panasonic-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 2b190e7

Please sign in to comment.