staging: rtl8723au: core: Remove uneeded return variable
authorRoberta Dobrescu <roberta.dobrescu@gmail.com>
Sun, 26 Oct 2014 21:30:09 +0000 (23:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 10:47:22 +0000 (18:47 +0800)
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.

It was done using the following semantic patch:

@@
identifier ret;
type T;
expression e;
@@

-T ret = e;
 ... when != ret
     when strict
-return ret;
+return e;

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_recv.c

index 4e2b22d97101ee02e35ab392ee1660c21a53113d..85d1eca5af8bad66ba659e9939931307ef70c0c0 100644 (file)
@@ -50,7 +50,6 @@ static void rtw_init_mlme_timer(struct rtw_adapter *padapter)
 int rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
 {
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       int res = _SUCCESS;
 
        pmlmepriv->nic_hdl = padapter;
 
@@ -68,7 +67,7 @@ int rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
        rtw_clear_scan_deny(padapter);
 
        rtw_init_mlme_timer(padapter);
-       return res;
+       return _SUCCESS;
 }
 
 #ifdef CONFIG_8723AU_AP_MODE
index 2624c778eff77a81be61d38b36010aac3d270887..0e0f73c86e53c5738dc5d728f2df0361d99c004e 100644 (file)
@@ -567,7 +567,6 @@ static u8 init_channel_set(struct rtw_adapter *padapter, u8 cplan,
 
 int init_mlme_ext_priv23a(struct rtw_adapter *padapter)
 {
-       int res = _SUCCESS;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -594,7 +593,7 @@ int init_mlme_ext_priv23a(struct rtw_adapter *padapter)
        pmlmeext->mlmeext_init = true;
 
        pmlmeext->active_keep_alive_check = true;
-       return res;
+       return _SUCCESS;
 }
 
 void free_mlme_ext_priv23a (struct mlme_ext_priv *pmlmeext)
index 6cdfc2337c4bc2c4e156246fd782719b6df61fd6..de98da5baa2b254beadac94a7de8268e9899b17c 100644 (file)
@@ -1554,8 +1554,6 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
        u16     eth_type, len, hdrlen;
        u8      bsnaphdr;
        u8      *psnap;
-
-       int ret = _SUCCESS;
        struct rtw_adapter *adapter = precvframe->adapter;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
 
@@ -1616,7 +1614,7 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
        }
 
 
-       return ret;
+       return _SUCCESS;
 }
 
 /* perform defrag */
This page took 0.030681 seconds and 5 git commands to generate.