staging: speakup: compress return logic into one line

Author: Alison Schofield <amsfield22@gmail.com>

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 12f880e..8960079 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];
 }
 
 /*
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.