diff options
author | Shraddha Barke <shraddha.6596@gmail.com> | 2015-07-27 19:07:57 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-31 16:05:41 -0700 |
commit | f523c7d7a66d97d0584182eb3ff4b2425219f9d8 (patch) | |
tree | 3831d394c9c5506ff4d7271fcf835ab2856d7600 /drivers | |
parent | 26589720620e8fe429681f599fdc145c8f57a8c6 (diff) | |
download | blackbird-op-linux-f523c7d7a66d97d0584182eb3ff4b2425219f9d8.tar.gz blackbird-op-linux-f523c7d7a66d97d0584182eb3ff4b2425219f9d8.zip |
Staging : rtl8188eu : os_dep : Compression of lines for immediate return
This patch compresses two lines into a single line if immediate return is
found. Also remove variable ret as it is no longer needed.
Semantic patch used for this is as follows:
@@
type T;
identifier i,f;
constant C;
@@
- T i;
...when != i
when strict
(
return -C;
|
- i =
+ return
f(...);
- return i;
)
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 844ed6f3263a..969574926e21 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -2485,16 +2485,13 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int static int rtw_hostapd_sta_flush(struct net_device *dev) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); DBG_88E("%s\n", __func__); flush_all_cam_entry(padapter); /* clear CAM */ - ret = rtw_sta_flush(padapter); - - return ret; + return rtw_sta_flush(padapter); } static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) @@ -2810,7 +2807,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) { - int ret = 0; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2821,13 +2817,11 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) return -EINVAL; - ret = rtw_acl_remove_sta(padapter, param->sta_addr); - return ret; + return rtw_acl_remove_sta(padapter, param->sta_addr); } 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 mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2838,8 +2832,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff && param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) return -EINVAL; - ret = rtw_acl_add_sta(padapter, param->sta_addr); - return ret; + return rtw_acl_add_sta(padapter, param->sta_addr); } static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param *param, int len) |