Commit f1844d1b authored by David Binder's avatar David Binder Committed by Greg Kroah-Hartman

staging: unisys: visorinput: Remove unnecessary usage of local variable

Remove local variable on stack by directly returning the value in the
array.
Signed-off-by: default avatarDavid Binder <david.binder@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 999bc1ff
...@@ -539,13 +539,10 @@ handle_locking_key(struct input_dev *visorinput_dev, ...@@ -539,13 +539,10 @@ handle_locking_key(struct input_dev *visorinput_dev,
static int static int
scancode_to_keycode(int scancode) scancode_to_keycode(int scancode)
{ {
int keycode;
if (scancode > 0xff) if (scancode > 0xff)
keycode = visorkbd_ext_keycode[(scancode >> 8) & 0xff]; return visorkbd_ext_keycode[(scancode >> 8) & 0xff];
else
keycode = visorkbd_keycode[scancode]; return visorkbd_keycode[scancode];
return keycode;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment