aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c')
-rw-r--r--target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c
index a380906b92..ad69debcc8 100644
--- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c
@@ -546,7 +546,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- priv->ds = dsa_switch_alloc(dev, DSA_MAX_PORTS);
+ priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
if (!priv->ds)
return -ENOMEM;