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:
Adrian Bunk 2008-02-20 00:59:03 +02:00 committed by Len Brown
parent e80af3a8db
commit d399d130c8
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}