From: Adrian Bunk Date: Tue, 19 Feb 2008 22:59:03 +0000 (+0200) Subject: sony-laptop.c: fix off-by-one X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d399d130c82a1e1751b7770944f487fbd8b6272a;p=openwrt%2Fstaging%2Fblogic.git sony-laptop.c: fix off-by-one This patch fixes an off-by-one spotted by the Coverity checker. Signed-off-by: Adrian Bunk Acked-by: Mattia Dongili Signed-off-by: Len Brown --- diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 899e3f75f288..02ff3d19b1cc 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c @@ -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; }