mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 08:46:43 +07:00
panasonic-laptop: fix X[ ARRAY_SIZE(X) ]
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>
This commit is contained in:
parent
5d8b532af9
commit
2b190e76de
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user