aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-02-20 00:59:03 +0200
committerLen Brown <len.brown@intel.com>2008-02-21 04:49:24 -0500
commitd399d130c82a1e1751b7770944f487fbd8b6272a (patch)
tree2aba39a7511e3fad2b2da70b41fcfd7718b630fe
parente80af3a8dbbbf431b2070cc760699f01c5a6ac69 (diff)
downloadkernel_samsung_espresso10-d399d130c82a1e1751b7770944f487fbd8b6272a.zip
kernel_samsung_espresso10-d399d130c82a1e1751b7770944f487fbd8b6272a.tar.gz
kernel_samsung_espresso10-d399d130c82a1e1751b7770944f487fbd8b6272a.tar.bz2
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>
-rw-r--r--drivers/misc/sony-laptop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 899e3f7..02ff3d1 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;
}