staging: et131x: Remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Tue, 20 May 2014 10:33:45 +0000 (12:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 11:43:47 +0000 (20:43 +0900)
commit8ea6cdf527aa4439604a4712ff2a35373471e367
tree147f2903843c7eef1a564b9b096fc2fa1710b7f8
parent43b54cc91b5d13110a99ef65a981c8bec9e68328
staging: et131x: Remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c