Commit 038b7039 authored by Roberta Dobrescu's avatar Roberta Dobrescu Committed by Greg Kroah-Hartman

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: default avatarRoberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35a00727
...@@ -50,7 +50,6 @@ static void rtw_init_mlme_timer(struct rtw_adapter *padapter) ...@@ -50,7 +50,6 @@ static void rtw_init_mlme_timer(struct rtw_adapter *padapter)
int rtw_init_mlme_priv23a(struct rtw_adapter *padapter) int rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
{ {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int res = _SUCCESS;
pmlmepriv->nic_hdl = padapter; pmlmepriv->nic_hdl = padapter;
...@@ -68,7 +67,7 @@ int rtw_init_mlme_priv23a(struct rtw_adapter *padapter) ...@@ -68,7 +67,7 @@ int rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
rtw_clear_scan_deny(padapter); rtw_clear_scan_deny(padapter);
rtw_init_mlme_timer(padapter); rtw_init_mlme_timer(padapter);
return res; return _SUCCESS;
} }
#ifdef CONFIG_8723AU_AP_MODE #ifdef CONFIG_8723AU_AP_MODE
......
...@@ -567,7 +567,6 @@ static u8 init_channel_set(struct rtw_adapter *padapter, u8 cplan, ...@@ -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 init_mlme_ext_priv23a(struct rtw_adapter *padapter)
{ {
int res = _SUCCESS;
struct registry_priv *pregistrypriv = &padapter->registrypriv; struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
...@@ -594,7 +593,7 @@ int init_mlme_ext_priv23a(struct rtw_adapter *padapter) ...@@ -594,7 +593,7 @@ int init_mlme_ext_priv23a(struct rtw_adapter *padapter)
pmlmeext->mlmeext_init = true; pmlmeext->mlmeext_init = true;
pmlmeext->active_keep_alive_check = true; pmlmeext->active_keep_alive_check = true;
return res; return _SUCCESS;
} }
void free_mlme_ext_priv23a (struct mlme_ext_priv *pmlmeext) void free_mlme_ext_priv23a (struct mlme_ext_priv *pmlmeext)
......
...@@ -1554,8 +1554,6 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe) ...@@ -1554,8 +1554,6 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
u16 eth_type, len, hdrlen; u16 eth_type, len, hdrlen;
u8 bsnaphdr; u8 bsnaphdr;
u8 *psnap; u8 *psnap;
int ret = _SUCCESS;
struct rtw_adapter *adapter = precvframe->adapter; struct rtw_adapter *adapter = precvframe->adapter;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
...@@ -1616,7 +1614,7 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe) ...@@ -1616,7 +1614,7 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
} }
return ret; return _SUCCESS;
} }
/* perform defrag */ /* perform defrag */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment