ERROR: do not use assignment in if condition
#59: FILE: drivers/platform/x86/sony-laptop.c:384:
+ if ((scancode = sony_laptop_input_index[event]) != -1) {
total: 1 errors, 0 warnings, 39 lines checked
./patches/drivers-platform-x86-sony-laptopc-fix-scancodes.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Please run checkpatch prior to sending patches
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
break;
}
- if ((scancode = sony_laptop_input_index[event]) != -1) {
+ scancode = sony_laptop_input_index[event];
+ if (scancode != -1) {
kp.key = sony_laptop_input_keycode_map[scancode];
if (kp.key != KEY_UNKNOWN)
kp.dev = key_dev;