mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 08:30:53 +07:00
sony-laptop.c: fix off-by-one
This patch fixes an off-by-one spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
e80af3a8db
commit
d399d130c8
@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (event > ARRAY_SIZE(sony_laptop_input_index)) {
|
||||
if (event >= ARRAY_SIZE(sony_laptop_input_index)) {
|
||||
dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user