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>
This commit is contained in:
Alison Schofield 2016-02-10 10:57:31 -08:00 committed by Greg Kroah-Hartman
parent b3d0ea8d80
commit 5a41b93476
1 changed files with 1 additions and 4 deletions

View File

@ -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];
}
/*