summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorinput
diff options
context:
space:
mode:
authorDavid Binder <david.binder@unisys.com>2017-03-17 11:27:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-21 07:58:46 +0100
commitf1844d1bcd5cde311f01e68f974e04d5db3c4f9a (patch)
treea1f19df714620c3b589090b510136bc7e2a48945 /drivers/staging/unisys/visorinput
parent999bc1ffb7dc8f2e0739fb3bf48fdcb79f562dca (diff)
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: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorinput')
-rw-r--r--drivers/staging/unisys/visorinput/visorinput.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 949cce680b29..3fc7d9e2db14 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -539,13 +539,10 @@ handle_locking_key(struct input_dev *visorinput_dev,
static int
scancode_to_keycode(int scancode)
{
- int keycode;
-
if (scancode > 0xff)
- keycode = visorkbd_ext_keycode[(scancode >> 8) & 0xff];
- else
- keycode = visorkbd_keycode[scancode];
- return keycode;
+ return visorkbd_ext_keycode[(scancode >> 8) & 0xff];
+
+ return visorkbd_keycode[scancode];
}
static int