diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2014-05-26 14:08:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-26 17:32:15 (GMT) |
commit | 4764ca981b040048766e4f39a45a4b9c5cecff9c (patch) | |
tree | b4743d812ce65e2be8ca8e9190a0385029bff358 /drivers/staging/rtl8192u/r819xU_phy.c | |
parent | 9c73b46af4f74c255fbc26edebef8b2a61f2b7e4 (diff) | |
download | linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.tar.xz |
drivers/staging: 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
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r819xU_phy.c')
-rw-r--r-- | drivers/staging/rtl8192u/r819xU_phy.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 87e07ba..02554c9 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -991,7 +991,6 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, { int i; - u8 ret = 0; switch (eRFPath) { case RF90_PATH_A: @@ -1058,7 +1057,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, break; } - return ret; + return 0; } |