From 5a41b934766a00764669922f1faac1fbdcc179bd Mon Sep 17 00:00:00 2001 From: Alison Schofield Date: Wed, 10 Feb 2016 10:57:31 -0800 Subject: [PATCH] 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 Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/i18n.c | 5 +---- 1 file changed, 1 insertion(+), 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]; } /* -- 2.39.5