[PATCH] staging: rtl8723bs: use kzalloc_obj() in rtw_wlan_util.c
From: Giorgi Tchankvetadze
Date: Sat Feb 21 2026 - 03:23:58 EST
Replace kzalloc(sizeof(*ptr), GFP) with kzalloc_obj() macro.
This improves type safety and readability.
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 9284657e23c2..e0c660e5f2d0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -1131,7 +1131,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
if (memcmp(cur_network->network.mac_address, pbssid, 6))
return true;
- bssid = kzalloc(sizeof(*bssid), GFP_KERNEL);
+ bssid = kzalloc_obj(bssid, GFP_KERNEL);
if (!bssid)
return true;
--
2.52.0