From: Andrew Morton Date: Thu, 8 Dec 2011 04:32:11 +0000 (+1100) Subject: drivers-platform-x86-sony-laptopc-fix-scancodes-checkpatch-fixes X-Git-Tag: next-20111214~2^2~197 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7d42bcdd74c990100371ae1aac113a943d535a77;p=karo-tx-linux.git drivers-platform-x86-sony-laptopc-fix-scancodes-checkpatch-fixes 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 --- diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 9ba4a2bea924..26ef0f34e1be 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -381,7 +381,8 @@ static void sony_laptop_report_input_event(u8 event) 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;