remove 'else'-clause that is not required after a 'return' statement. checkpatch warning produced: WARNING: else is not generally useful after a break or return Signed-off-by: Abhirup Deb <abhirupdeb@xxxxxxxxxxxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 61 ++++++++++----------- drivers/staging/r8188eu/hal/usb_halinit.c | 7 ++- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 1b9cf7596a76..6302901a3be1 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -7721,49 +7721,48 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf) { if (send_beacon(padapter) == _FAIL) { return H2C_PARAMETERS_ERROR; - } else { - /* tx bc/mc frames after update TIM */ - struct sta_info *psta_bmc; - struct list_head *xmitframe_plist, *xmitframe_phead; - struct xmit_frame *pxmitframe = NULL; - struct sta_priv *pstapriv = &padapter->stapriv; + } + /* tx bc/mc frames after update TIM */ + struct sta_info *psta_bmc; + struct list_head *xmitframe_plist, *xmitframe_phead; + struct xmit_frame *pxmitframe = NULL; + struct sta_priv *pstapriv = &padapter->stapriv; - /* for BC/MC Frames */ - psta_bmc = rtw_get_bcmc_stainfo(padapter); - if (!psta_bmc) - return H2C_SUCCESS; + /* for BC/MC Frames */ + psta_bmc = rtw_get_bcmc_stainfo(padapter); + if (!psta_bmc) + return H2C_SUCCESS; - if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 0)) { - msleep(10);/* 10ms, ATIM(HIQ) Windows */ - spin_lock_bh(&psta_bmc->sleep_q.lock); + if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 0)) { + msleep(10);/* 10ms, ATIM(HIQ) Windows */ + spin_lock_bh(&psta_bmc->sleep_q.lock); - xmitframe_phead = get_list_head(&psta_bmc->sleep_q); - xmitframe_plist = xmitframe_phead->next; + xmitframe_phead = get_list_head(&psta_bmc->sleep_q); + xmitframe_plist = xmitframe_phead->next; - while (xmitframe_phead != xmitframe_plist) { - pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); + while (xmitframe_phead != xmitframe_plist) { + pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list); - xmitframe_plist = xmitframe_plist->next; + xmitframe_plist = xmitframe_plist->next; - list_del_init(&pxmitframe->list); + list_del_init(&pxmitframe->list); - psta_bmc->sleepq_len--; - if (psta_bmc->sleepq_len > 0) - pxmitframe->attrib.mdata = 1; - else - pxmitframe->attrib.mdata = 0; + psta_bmc->sleepq_len--; + if (psta_bmc->sleepq_len > 0) + pxmitframe->attrib.mdata = 1; + else + pxmitframe->attrib.mdata = 0; - pxmitframe->attrib.triggered = 1; + pxmitframe->attrib.triggered = 1; - pxmitframe->attrib.qsel = 0x11;/* HIQ */ + pxmitframe->attrib.qsel = 0x11;/* HIQ */ - spin_unlock_bh(&psta_bmc->sleep_q.lock); - if (rtl8188eu_hal_xmit(padapter, pxmitframe)) - rtw_xmit_complete(padapter, pxmitframe); - spin_lock_bh(&psta_bmc->sleep_q.lock); - } spin_unlock_bh(&psta_bmc->sleep_q.lock); + if (rtl8188eu_hal_xmit(padapter, pxmitframe)) + rtw_xmit_complete(padapter, pxmitframe); + spin_lock_bh(&psta_bmc->sleep_q.lock); } + spin_unlock_bh(&psta_bmc->sleep_q.lock); } return H2C_SUCCESS; } diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 9c2774eb5f78..8a8d74f0f2a6 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -596,10 +596,11 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) Adapter->bFWReady = false; haldata->fw_ractrl = false; return status; - } else { - Adapter->bFWReady = true; - haldata->fw_ractrl = false; } + + Adapter->bFWReady = true; + haldata->fw_ractrl = false; + /* Initialize firmware vars */ Adapter->pwrctrlpriv.bFwCurrentInPSMode = false; haldata->LastHMEBoxNum = 0; -- 2.31.1