public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: use kzalloc_obj() in rtw_wlan_util.c
@ 2026-02-21  8:23 Giorgi Tchankvetadze
  2026-02-21 12:51 ` kernel test robot
  2026-02-21 13:44 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Giorgi Tchankvetadze @ 2026-02-21  8:23 UTC (permalink / raw)
  To: gregkh, linux-staging; +Cc: linux-kernel, Giorgi Tchankvetadze

Replace kzalloc(sizeof(*ptr), GFP) with kzalloc_obj() macro.
This improves type safety and readability.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-21 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-21  8:23 [PATCH] staging: rtl8723bs: use kzalloc_obj() in rtw_wlan_util.c Giorgi Tchankvetadze
2026-02-21 12:51 ` kernel test robot
2026-02-21 13:44 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox