Commit d399d130 authored by Adrian Bunk's avatar Adrian Bunk Committed by Len Brown

sony-laptop.c: fix off-by-one

This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Acked-by: default avatarMattia Dongili <malattia@linux.it>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent e80af3a8
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment