[openwrt/openwrt] realtek: use devm_kzalloc() for serdes debugfs setup
LEDE Commits
lede-commits at lists.infradead.org
Mon Dec 15 00:30:08 PST 2025
robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/bcbf4bd8acd2f05850ed64e7900a68af79e1a774
commit bcbf4bd8acd2f05850ed64e7900a68af79e1a774
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Dec 14 10:07:38 2025 +0100
realtek: use devm_kzalloc() for serdes debugfs setup
This will free memory automatically during driver unloading.
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21157
Signed-off-by: Robert Marko <robimarko at gmail.com>
(cherry picked from commit a4011797c2fb160a696edfc29993c78ab5edc3d1)
---
.../realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
index 394af71250..5c8741383f 100644
--- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
+++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
@@ -148,7 +148,7 @@ static int rtsds_debug_init(struct rtsds_ctrl *ctrl, u32 sds)
struct dentry *dir, *root;
char dirname[32];
- dbg_info = kzalloc(sizeof(*dbg_info), GFP_KERNEL);
+ dbg_info = devm_kzalloc(ctrl->dev, sizeof(*dbg_info), GFP_KERNEL);
if (!dbg_info)
return -ENOMEM;
More information about the lede-commits
mailing list