]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers-platform-x86-sony-laptopc-fix-scancodes-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 2 Dec 2011 03:08:41 +0000 (14:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Dec 2011 05:32:33 +0000 (16:32 +1100)
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>
drivers/platform/x86/sony-laptop.c

index 9ba4a2bea92475902de8d28ac52813fe9c92df95..26ef0f34e1bef7cab5752513ae1c0f94bd38a5f3 100644 (file)
@@ -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;