sony-laptop.c: fix off-by-one
Subsystems (2)
PATCH 1/1 sony-laptop.c: fix off-by-one
This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/misc/sony-laptop.c renamed from drivers/misc/sony-laptop.c.old +1 -1
@@ -314,9 +314,9 @@ static void sony_laptop_report_input_eve kp.dev = jog_dev;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 ; }if (sony_laptop_input_index[event] !=-1 ) {
Quoted 3 lines · Adrian Bunk
This patch fixes an off-by-one spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
Acked-by Mattia Dongili <[email protected]>
Quoted 20 lines
---
drivers/misc/sony-laptop.c renamed from drivers/misc/sony-laptop.c.old +1
-2@@ -314,9 +314,9 @@ static void sony_laptop_report_input_eve kp.dev = jog_dev;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 ; }if (sony_laptop_input_index[event] !=-1 ) { -To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
mattia :wq!