diff options
author | Somya Anand | 2015-03-04 09:40:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-03-07 00:30:07 +0100 |
commit | aea42ee42196ee164b46eda047953c0974536d5b (patch) | |
tree | 79412b3f0986df52a1f2c9bf4467165b23387ee8 /drivers/staging/rtl8188eu/core/rtw_wlan_util.c | |
parent | staging: rtl8712: replace memset(x,0,ETH_ALEN) (diff) | |
download | kernel-qcow2-linux-aea42ee42196ee164b46eda047953c0974536d5b.tar.gz kernel-qcow2-linux-aea42ee42196ee164b46eda047953c0974536d5b.tar.xz kernel-qcow2-linux-aea42ee42196ee164b46eda047953c0974536d5b.zip |
Staging: rtl8188eu: Remove redundant local variable
This patch removes a redundant variable "raid" and adds inline
return statements.
This issue is identified by the following coccinelle script:
@@
expression ret;
identifier f;
@@
-ret =
+return
f(...);
-return ret;
Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_wlan_util.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index a3ffc691be9a..6917abf21ec0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -88,35 +88,25 @@ int cckratesonly_included(unsigned char *rate, int ratelen) unsigned char networktype_to_raid(unsigned char network_type) { - unsigned char raid; - switch (network_type) { case WIRELESS_11B: - raid = RATR_INX_WIRELESS_B; - break; + return RATR_INX_WIRELESS_B; case WIRELESS_11A: case WIRELESS_11G: - raid = RATR_INX_WIRELESS_G; - break; + return RATR_INX_WIRELESS_G; case WIRELESS_11BG: - raid = RATR_INX_WIRELESS_GB; - break; + return RATR_INX_WIRELESS_GB; case WIRELESS_11_24N: case WIRELESS_11_5N: - raid = RATR_INX_WIRELESS_N; - break; + return RATR_INX_WIRELESS_N; case WIRELESS_11A_5N: case WIRELESS_11G_24N: - raid = RATR_INX_WIRELESS_NG; - break; + return RATR_INX_WIRELESS_NG; case WIRELESS_11BG_24N: - raid = RATR_INX_WIRELESS_NGB; - break; + return RATR_INX_WIRELESS_NGB; default: - raid = RATR_INX_WIRELESS_GB; - break; + return RATR_INX_WIRELESS_GB; } - return raid; } u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen) |