remove empty if-else block, remove unused variable as well, to suppress the compiler warning: drivers/staging/rtl8723bs/core/rtw_cmd.c: In function ‘rtw_createbss_cmd’: drivers/staging/rtl8723bs/core/rtw_cmd.c:661:22: warning: unused variable ‘pmlmepriv’ [-Wunused-variable] struct mlme_priv *pmlmepriv = &padapter->mlmepriv; Signed-off-by: Fabio Aiuto <fabioaiuto83@xxxxxxxxx> --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index e143f89ea39e..e6d507ed60c5 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -658,14 +658,9 @@ u8 rtw_createbss_cmd(struct adapter *padapter) { struct cmd_obj *pcmd; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pdev_network = &padapter->registrypriv.dev_network; u8 res = _SUCCESS; - if (pmlmepriv->assoc_ssid.SsidLength == 0) - ; - else - pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { res = _FAIL; @@ -751,10 +746,6 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) u32 tmp_len; u8 *ptmp = NULL; - if (pmlmepriv->assoc_ssid.SsidLength == 0) - ; - else - pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { res = _FAIL; -- 2.20.1