From ece10b5d5e28a7643f8e34e5089b19754f80d714 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 2 Dec 2011 14:08:41 +1100 Subject: [PATCH] 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 --- drivers/platform/x86/sony-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5