[PATCH] staging: rtl8723bs: remove redundant kfree check in rtw_xmit.c
From: Andrezinrc
Date: Thu Jun 18 2026 - 22:32:01 EST
Remove the redundant null check before calling kfree. ccheckpatch
reminds us that kfree(NULL) is safe and this check is not required.
Signed-off-by: Andrezinrc <andrem.33333@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 7bce0343d..92e818705 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1736,10 +1736,9 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
pxmitframe->pkt = NULL;
}
- if (pxmitframe->alloc_addr) {
- kfree(pxmitframe->alloc_addr);
+ kfree(pxmitframe->alloc_addr);
+ if (pxmitframe->alloc_addr)
goto check_pkt_complete;
- }
if (pxmitframe->ext_tag == 0)
queue = &pxmitpriv->free_xmit_queue;
--
2.43.0