Commit 4769aae3 authored by Shobhit Kukreti's avatar Shobhit Kukreti Committed by Greg Kroah-Hartman

staging: rtl8723bs: Fix Unneeded variable: "ret". Return "0"

coccicheck reported Unneeded variable ret at rtl8723bs/core/rtw_ap.c:1400.
Function "rtw_acl_remove_sta" always returns 0. Modified return type of the
function to void.
Signed-off-by: default avatarShobhit Kukreti <shobhitkukreti@gmail.com>
Reviewed-by: default avatarBastien Nocera <hadess@hadess.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7dd567e
...@@ -1394,10 +1394,9 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) ...@@ -1394,10 +1394,9 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
return ret; return ret;
} }
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
{ {
struct list_head *plist, *phead; struct list_head *plist, *phead;
int ret = 0;
struct rtw_wlan_acl_node *paclnode; struct rtw_wlan_acl_node *paclnode;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
...@@ -1438,7 +1437,6 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) ...@@ -1438,7 +1437,6 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num); DBG_871X("%s, acl_num =%d\n", __func__, pacl_list->num);
return ret;
} }
u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta) u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
......
...@@ -19,7 +19,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len); ...@@ -19,7 +19,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len);
void rtw_ap_restore_network(struct adapter *padapter); void rtw_ap_restore_network(struct adapter *padapter);
void rtw_set_macaddr_acl(struct adapter *padapter, int mode); void rtw_set_macaddr_acl(struct adapter *padapter, int mode);
int rtw_acl_add_sta(struct adapter *padapter, u8 *addr); int rtw_acl_add_sta(struct adapter *padapter, u8 *addr);
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr); void rtw_acl_remove_sta(struct adapter *padapter, u8 *addr);
u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta); u8 rtw_ap_set_pairwise_key(struct adapter *padapter, struct sta_info *psta);
int rtw_ap_set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid); int rtw_ap_set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid);
......
...@@ -4174,7 +4174,8 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p ...@@ -4174,7 +4174,8 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p
return -EINVAL; return -EINVAL;
} }
return rtw_acl_remove_sta(padapter, param->sta_addr); rtw_acl_remove_sta(padapter, param->sta_addr);
return 0;
} }
......
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