mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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:
parent
e80af3a8db
commit
d399d130c8
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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);
|
dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue