drivers/staging: Remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Mon, 26 May 2014 14:08:50 +0000 (16:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 May 2014 17:32:15 +0000 (10:32 -0700)
commit4764ca981b040048766e4f39a45a4b9c5cecff9c
treeb4743d812ce65e2be8ca8e9190a0385029bff358
parent9c73b46af4f74c255fbc26edebef8b2a61f2b7e4
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>
17 files changed:
drivers/staging/bcm/Bcmchar.c
drivers/staging/bcm/InterfaceIdleMode.c
drivers/staging/bcm/PHSModule.c
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_softmac_wx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
drivers/staging/rtl8192u/r819xU_cmdpkt.c
drivers/staging/rtl8192u/r819xU_phy.c
drivers/staging/sep/sep_main.c
drivers/staging/silicom/bpctl_mod.c
drivers/staging/wlan-ng/hfa384x_usb.c
drivers/staging/wlan-ng/p80211req.c