summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Stockhausen2025-12-14 09:07:38 +0000
committerRobert Marko2025-12-15 08:30:03 +0000
commitbcbf4bd8acd2f05850ed64e7900a68af79e1a774 (patch)
tree4b2d7bd7239d2a0c6855bad5594fcb4a8636bab5
parent77b47f33e58da08d7038457972341460c9d30632 (diff)
downloadopenwrt-bcbf4bd8acd2f05850ed64e7900a68af79e1a774.tar.gz
realtek: use devm_kzalloc() for serdes debugfs setup
This will free memory automatically during driver unloading. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21157 Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit a4011797c2fb160a696edfc29993c78ab5edc3d1)
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c2
1 files changed, 1 insertions, 1 deletions
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;