Re: [PATCH] staging: r8188eu: drop return value from receive_disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/26/22 20:07, Martin Kaiser wrote:
The receive_disconnect function always returns _SUCCESS. None of the
callers checks the return value. We can remove it.

Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
  drivers/staging/r8188eu/core/rtw_mlme_ext.c    | 5 ++---
  drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 +--
  2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index cce0575e93b7..fc6e06d7b5ca 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -6191,14 +6191,14 @@ void start_clnt_assoc(struct adapter *padapter)
  	set_link_timer(pmlmeext, REASSOC_TO);
  }
-unsigned int receive_disconnect(struct adapter *padapter, unsigned char *MacAddr, unsigned short reason)
+void receive_disconnect(struct adapter *padapter, unsigned char *MacAddr, unsigned short reason)
  {
  	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
  	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
/* check A3 */
  	if (!(!memcmp(MacAddr, get_my_bssid(&pmlmeinfo->network), ETH_ALEN)))
-		return _SUCCESS;
+		return;
if ((pmlmeinfo->state & 0x03) == WIFI_FW_STATION_STATE) {
  		if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) {
@@ -6209,7 +6209,6 @@ unsigned int receive_disconnect(struct adapter *padapter, unsigned char *MacAddr
  			report_join_res(padapter, -2);
  		}
  	}
-	return _SUCCESS;
  }
static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid)
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index 71864733b1c0..56c0e584bb6c 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -468,8 +468,7 @@ unsigned int update_MSC_rate(struct HT_caps_element *pHT_caps);
  void Update_RA_Entry(struct adapter *padapter, u32 mac_id);
  void set_sta_rate(struct adapter *padapter, struct sta_info *psta);
-unsigned int receive_disconnect(struct adapter *padapter,
-				unsigned char *macaddr, unsigned short reason);
+void receive_disconnect(struct adapter *padapter, unsigned char *macaddr, unsigned short reason);
unsigned char get_highest_rate_idx(u32 mask);
  int support_short_GI(struct adapter *padapter, struct HT_caps_element *caps);

Tested-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx> # Edimax N150




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux