HID: prodikeys: remove unused variable
authorJiri Slaby <jslaby@suse.cz>
Tue, 5 May 2015 08:09:53 +0000 (10:09 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 7 May 2015 08:33:58 +0000 (10:33 +0200)
'key' is set but never used in the first loop. So remove the set.

And indent the re-set of pm->last_key properly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-prodikeys.c

index 91fab97..e3e98cc 100644 (file)
@@ -395,11 +395,10 @@ static int pcmidi_handle_report4(struct pcmidi_snd *pm, u8 *data)
 
        /* break keys */
        for (bit_index = 0; bit_index < 24; bit_index++) {
-               key = pm->last_key[bit_index];
                if (!((0x01 << bit_index) & bit_mask)) {
                        input_event(pm->input_ep82, EV_KEY,
                                pm->last_key[bit_index], 0);
-                               pm->last_key[bit_index] = 0;
+                       pm->last_key[bit_index] = 0;
                }
        }