Message ID | 4A15B5CA.9060907@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Thu, May 21, 2009 at 10:12:58PM +0200, Roel Kluin wrote: > Do not go beyond ARRAY_SIZE of pcc->keymap > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Presumably you meant to send this to linux-acpi or linux-kernel instead of linux-sh ;-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/misc/panasonic-laptop.c b/drivers/misc/panasonic-laptop.c index 4a1bc64..d82d1cc 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));
Do not go beyond ARRAY_SIZE of pcc->keymap Signed-off-by: Roel Kluin <roel.kluin@gmail.com> --- This is against linux-next -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html