diff mbox

[1/1] HID: prodikeys, remove unused variable

Message ID 1430813393-28661-1-git-send-email-jslaby@suse.cz (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Jiri Slaby May 5, 2015, 8:09 a.m. UTC
'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>
---
 drivers/hid/hid-prodikeys.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jiri Kosina May 7, 2015, 8:36 a.m. UTC | #1
On Tue, 5 May 2015, Jiri Slaby wrote:

> '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>

Applied to for-4.2/upstream. Thanks,
diff mbox

Patch

diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c
index 91fab975063c..e3e98ccf137b 100644
--- a/drivers/hid/hid-prodikeys.c
+++ b/drivers/hid/hid-prodikeys.c
@@ -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;
 		}
 	}