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