staging: rtl8723bs: clean up style in core files
PATCH 1/1 staging: rtl8723bs: clean up style in core files
Remove unnecessary braces from a single statement block in rtw_wlan_util.c. Additionally, remove an redundant NULL check before kfree() in rtw_xmit.c, as kfree() is completely safe to be called with a NULL pointer.
Signed-off-by Ruziev Miraly <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 +-- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1 -2
@@ -256,9 +256,8 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch) {struct dvobj_priv *dvobj =adapter_to_dvobj (adapter); -if (dvobj->oper_channel != ch) { +if (dvobj->oper_channel != ch) dvobj->on_oper_ch_time = jiffies; - } dvobj->oper_channel = ch; }
drivers/staging/rtl8723bs/core/rtw_xmit.c +1 -4
@@ -1768,10 +1768,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram pxmitframe->pkt =NULL ; } -if (pxmitframe->alloc_addr) { -kfree (pxmitframe->alloc_addr); - goto check_pkt_complete; - } +kfree (pxmitframe->alloc_addr);if (pxmitframe->ext_tag ==0 ) queue = &pxmitpriv->free_xmit_queue;
Signature · 1 line
2.54.0
Quoted 30 lines · Ruziev Miraly
Remove unnecessary braces from a single statement block in
rtw_wlan_util.c. Additionally, remove an redundant NULL check beforekfree()inrtw_xmit.c, askfree()is completely safe to be called with a NULL pointer.Signed-off-by Ruziev Miraly <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 +-- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-)drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1
-2@@ -256,9 +256,8 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch) {struct dvobj_priv *dvobj =adapter_to_dvobj (adapter); -if (dvobj->oper_channel != ch) { +if (dvobj->oper_channel != ch) dvobj->on_oper_ch_time = jiffies; - } dvobj->oper_channel = ch; }drivers/staging/rtl8723bs/core/rtw_xmit.c +0
-0
drivers/staging/rtl8723bs/core/rtw_xmit.c s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram · line 1773
Quoted 6 lines
drivers/staging/rtl8723bs/core/rtw_xmit.c +0
-3@@ -1768,10 +1768,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram pxmitframe->pkt =NULL ; } -if (pxmitframe->alloc_addr) { -kfree (pxmitframe->alloc_addr); - goto check_pkt_complete;
Why did you delete this goto?
regards,
dan carpenter
Quoted 3 lines
drivers/staging/rtl8723bs/core/rtw_xmit.c +1
-1- } +kfree (pxmitframe->alloc_addr);