diff options
author | Peter Senna Tschudin | 2014-05-26 16:08:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-05-26 19:32:15 +0200 |
commit | 4764ca981b040048766e4f39a45a4b9c5cecff9c (patch) | |
tree | b4743d812ce65e2be8ca8e9190a0385029bff358 /drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |
parent | Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines (diff) | |
download | kernel-qcow2-linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.tar.gz kernel-qcow2-linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.tar.xz kernel-qcow2-linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.zip |
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/ieee80211/ieee80211_softmac.c')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 5274ff0fb7a2..c5a0a5da97da 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -2854,7 +2854,6 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value) struct ieee80211_security sec = { .flags = SEC_AUTH_MODE, }; - int ret = 0; if (value & AUTH_ALG_SHARED_KEY) { sec.auth_mode = WLAN_AUTH_SHARED_KEY; @@ -2877,7 +2876,7 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value) //else // ret = -EOPNOTSUPP; - return ret; + return 0; } static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 value) |