Skip to contentSkip to conversation

staging: rtl8723bs: remove redundant goto in rtw_alloc_xmitframe_once()

PATCH Superseded Moises Dominguez 1 participant 1 message Sep 13 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove redundant goto in rtw_alloc_xmitframe_once()

Remove the redundant goto and return NULL directly when allocation fails.

---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +1 -2
index 81d9e713fc12..cd659bd2f261 100644
@@ -1715,7 +1715,7 @@ struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv)
 
 	alloc_addr = kzalloc(sizeof(*pxframe) + 4, GFP_ATOMIC);
 	if (!alloc_addr)
-		goto exit;
+		return NULL;
 
 	pxframe = (struct xmit_frame *)N_BYTE_ALIGMENT((SIZE_PTR)(alloc_addr), 4);
 	pxframe->alloc_addr = alloc_addr;
@@ -1730,7 +1730,6 @@ struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv)
 
 	rtw_init_xmitframe(pxframe);
 
-exit:
 	return pxframe;
 }
 

base-commit: 2f0c1cf72f4682178506f513bbf015e591b1aa4a

Signature · 1 line
2.55.0