[PATCH] staging: rtl8723bs: break long lines in rtw_sta_mgt.c

From: MalavyaRaval

Date: Thu Mar 19 2026 - 13:45:27 EST


The original patch attempted to use the preferred sizeof(*ptr) style,
but since the target variable is a u8 pointer, this caused a buffer
overflow. Reverting to sizeof(struct sta_info) ensures the correct
allocation size while satisfying the line-splitting requirement.

Signed-off-by: MalavyaRaval <malavyaraval@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 07a6db1d2317..867877413859 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -54,7 +54,8 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
struct sta_info *psta;
s32 i;

- pstapriv->pallocated_stainfo_buf = vzalloc(sizeof(struct sta_info) * NUM_STA + 4);
+ pstapriv->pallocated_stainfo_buf = vzalloc(sizeof(struct sta_info) *
+ NUM_STA + 4);

if (!pstapriv->pallocated_stainfo_buf)
return _FAIL;
--
2.43.0