Staging: rtl8188eu: core: Remove variable that is not very useful.
authorHeena Sirwani <heenasirwani@gmail.com>
Mon, 6 Oct 2014 13:09:47 +0000 (18:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:12 +0000 (10:29 +0800)
The following patch removes a variable which is not very useful using
coccinelle.
The following semaintic patch was used:
@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c

index 7de7ba197be1beda540b064c6558c56ce9d7b5bb..d61842ed673e737883061be8003181b14bd06190 100644 (file)
@@ -1186,7 +1186,6 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
 {
        struct list_head *plist, *phead;
-       int ret = 0;
        struct rtw_wlan_acl_node *paclnode;
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
@@ -1217,7 +1216,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
        spin_unlock_bh(&(pacl_node_q->lock));
 
        DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
-       return ret;
+       return 0;
 }
 
 static void update_bcn_fixed_ie(struct adapter *padapter)
@@ -1753,7 +1752,6 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
 int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
 {
        struct list_head *phead, *plist;
-       int ret = 0;
        struct sta_info *psta = NULL;
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -1761,7 +1759,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
        u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
        if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
-               return ret;
+               return 0;
 
        DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
                FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
@@ -1782,13 +1780,12 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
 
        issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
 
-       return ret;
+       return 0;
 }
 
 int rtw_sta_flush(struct adapter *padapter)
 {
        struct list_head *phead, *plist;
-       int ret = 0;
        struct sta_info *psta = NULL;
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -1798,7 +1795,7 @@ int rtw_sta_flush(struct adapter *padapter)
        DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
 
        if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
-               return ret;
+               return 0;
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
        phead = &pstapriv->asoc_list;
@@ -1822,7 +1819,7 @@ int rtw_sta_flush(struct adapter *padapter)
 
        associated_clients_update(padapter, true);
 
-       return ret;
+       return 0;
 }
 
 /* called > TSR LEVEL for USB or SDIO Interface*/