summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorAlison Schofield <amsfield22@gmail.com>2016-02-10 21:57:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-12 07:00:30 +0300
commit5a41b934766a00764669922f1faac1fbdcc179bd (patch)
tree9a117f3dfdb9ed8bde39bba3258ccdf9c17aafc4 /drivers/staging/speakup
parentb3d0ea8d8078ee0e1ffc751c17c33fc3589b9446 (diff)
downloadlinux-5a41b934766a00764669922f1faac1fbdcc179bd.tar.xz
staging: speakup: compress return logic into one line
Simplify function return by merging assignment and return into one command line. Remove (now) unused local variable. Found using Coccinelle: @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Alison Schofield <amsfield22@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/i18n.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c
index 12f880ed4ddf..8960079e4d60 100644
--- a/drivers/staging/speakup/i18n.c
+++ b/drivers/staging/speakup/i18n.c
@@ -393,10 +393,7 @@ static const int num_groups = ARRAY_SIZE(all_groups);
char *spk_msg_get(enum msg_index_t index)
{
- char *ch;
-
- ch = speakup_msgs[index];
- return ch;
+ return speakup_msgs[index];
}
/*