提交 d399d130 编写于 作者: A Adrian Bunk 提交者: Len Brown

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

This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Acked-by: NMattia Dongili <malattia@linux.it>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册