]> git.karo-electronics.de Git - linux-beck.git/commit
staging: wlags49_h2: wl_priv: Remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Tue, 20 May 2014 10:33:42 +0000 (12:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 16:55:14 +0000 (01:55 +0900)
commit2b9d89dd7acfc08b2fcb935f73a8d480e9067a97
tree9e039988d15e3a5cf720fab1f68eb92a1c7e1008
parentaac22d07bc08befb0e3c7cbc2e91a8d8dce75cf2
staging: wlags49_h2: wl_priv: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlags49_h2/wl_priv.c