mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 09:09:44 +01:00
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>
This commit is contained in:
parent
3c073b5cb2
commit
a4011797c2
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue