提交 2b190e76 编写于 作者: R Roel Kluin 提交者: Len Brown

panasonic-laptop: fix X[ ARRAY_SIZE(X) ]

Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 5d8b532a
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册