Skip to content

Commit bcbf4bd

Browse files
plappermaulrobimarko
authored andcommitted
realtek: use devm_kzalloc() for serdes debugfs setup
This will free memory automatically during driver unloading. Signed-off-by: Markus Stockhausen <[email protected]> Link: openwrt/openwrt#21157 Signed-off-by: Robert Marko <[email protected]> (cherry picked from commit a401179)
1 parent 77b47f3 commit bcbf4bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int rtsds_debug_init(struct rtsds_ctrl *ctrl, u32 sds)
148148
struct dentry *dir, *root;
149149
char dirname[32];
150150

151-
dbg_info = kzalloc(sizeof(*dbg_info), GFP_KERNEL);
151+
dbg_info = devm_kzalloc(ctrl->dev, sizeof(*dbg_info), GFP_KERNEL);
152152
if (!dbg_info)
153153
return -ENOMEM;
154154

0 commit comments

Comments
 (0)