From ec778e2c921546e55e914033b3fe112b33708381 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sat, 17 Jan 2009 15:51:27 +0100 Subject: 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 Signed-off-by: Len Brown Signed-off-by: Greg Kroah-Hartman --- drivers/misc/panasonic-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') 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)); -- cgit v1.2.3