From: Roberta Dobrescu Date: Sun, 26 Oct 2014 21:30:09 +0000 (+0200) Subject: staging: rtl8723au: core: Remove uneeded return variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=038b70395a8a9b290bcd3aed292e4130a83944c7;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: core: Remove uneeded return variable 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index 4e2b22d97101..85d1eca5af8b 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -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 diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 2624c778eff7..0e0f73c86e53 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -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) diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 6cdfc2337c4b..de98da5baa2b 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -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 */