diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-06-29 21:26:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-01 10:07:03 +0300 |
commit | 690a993f100fa63e4d3af83e3b2334211738f181 (patch) | |
tree | ac7f9b3da2e8858470bb8476007503d40ab71676 /drivers/staging/rtl8188eu | |
parent | 01bc283e819895cca6d9b5c91062552db79cac26 (diff) | |
download | linux-690a993f100fa63e4d3af83e3b2334211738f181.tar.xz |
staging/rtl8188eu/os_dep: Remove unneeded variable ret
Below list of functions returns 0 in success and -EINVAL in failure. So
directly return 0 on Success.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index f47e51a6a5ec..ec5835d1aa8c 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -2508,7 +2508,6 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) { - int ret = 0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2538,7 +2537,7 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) DBG_88E("rtw_del_sta(), sta has already been removed or never been added\n"); } - return ret; + return 0; } static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *param, int len) @@ -2636,7 +2635,6 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, int len) { - int ret = 0; unsigned char wps_oui[4] = {0x0, 0x50, 0xf2, 0x04}; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -2668,12 +2666,11 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, pmlmeext->bstart_bss = true; } - return ret; + return 0; } static int rtw_set_wps_probe_resp(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); int ie_len; @@ -2698,12 +2695,11 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len); } - return ret; + return 0; } static int rtw_set_wps_assoc_resp(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); int ie_len; @@ -2729,12 +2725,11 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len); } - return ret; + return 0; } static int rtw_set_hidden_ssid(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); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); @@ -2754,7 +2749,7 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param, value = 0; DBG_88E("%s value(%u)\n", __func__, value); pmlmeinfo->hidden_ssid_mode = value; - return ret; + return 0; } static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *param, int len) @@ -2787,7 +2782,6 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para static int rtw_ioctl_set_macaddr_acl(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); @@ -2796,7 +2790,7 @@ static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param * rtw_set_macaddr_acl(padapter, param->u.mlme.command); - return ret; + return 0; } static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) |