Commit dedc1a73 authored by Harsha Sharma's avatar Harsha Sharma Committed by Greg Kroah-Hartman

staging: rtl8723bs: Merge assignment with return

Merge assignment with return statement to directly return the value.
Done using following coccinelle semantic patch

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;
Signed-off-by: default avatarHarsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent af9cdf95
...@@ -2123,12 +2123,9 @@ static int rtw_wx_set_gen_ie(struct net_device *dev, ...@@ -2123,12 +2123,9 @@ static int rtw_wx_set_gen_ie(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
int ret;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
ret = rtw_set_wpa_ie(padapter, extra, wrqu->data.length); return rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
return ret;
} }
static int rtw_wx_set_auth(struct net_device *dev, static int rtw_wx_set_auth(struct net_device *dev,
...@@ -3857,7 +3854,6 @@ static int rtw_hostapd_sta_flush(struct net_device *dev) ...@@ -3857,7 +3854,6 @@ static int rtw_hostapd_sta_flush(struct net_device *dev)
{ {
/* _irqL irqL; */ /* _irqL irqL; */
/* struct list_head *phead, *plist; */ /* struct list_head *phead, *plist; */
int ret = 0;
/* struct sta_info *psta = NULL; */ /* struct sta_info *psta = NULL; */
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
/* struct sta_priv *pstapriv = &padapter->stapriv; */ /* struct sta_priv *pstapriv = &padapter->stapriv; */
...@@ -3866,9 +3862,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev) ...@@ -3866,9 +3862,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev)
flush_all_cam_entry(padapter); /* clear CAM */ flush_all_cam_entry(padapter); /* clear CAM */
ret = rtw_sta_flush(padapter); return rtw_sta_flush(padapter);
return ret;
} }
...@@ -4266,7 +4260,6 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, ...@@ -4266,7 +4260,6 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param,
static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *param, int len) static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *param, int len)
{ {
int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
...@@ -4279,15 +4272,12 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p ...@@ -4279,15 +4272,12 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p
return -EINVAL; return -EINVAL;
} }
ret = rtw_acl_remove_sta(padapter, param->sta_addr); return rtw_acl_remove_sta(padapter, param->sta_addr);
return ret;
} }
static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *param, int len) static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *param, int len)
{ {
int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
...@@ -4300,9 +4290,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para ...@@ -4300,9 +4290,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para
return -EINVAL; return -EINVAL;
} }
ret = rtw_acl_add_sta(padapter, param->sta_addr); return rtw_acl_add_sta(padapter, param->sta_addr);
return ret;
} }
......
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