diff options
| author | Rosen Penev | 2024-11-10 23:54:14 +0000 |
|---|---|---|
| committer | Petr Štetiar | 2024-11-28 18:46:55 +0000 |
| commit | 655874713ee32f5f16f038c4291b02da3a018b76 (patch) | |
| tree | ef581aae1534f198905bebcbef3aaa8893b09c71 | |
| parent | 96ab90a9aa75c06fd85cb94babe12b8cb49e32ce (diff) | |
| download | openwrt-655874713ee32f5f16f038c4291b02da3a018b76.tar.gz | |
realtek: rtl83xx: use devm for mutex_init
mutex_destroy is missing in remove.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16926
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 1125ed408c7f0d130b5606ab39e4dd98a41d5f0a)
Link: https://github.com/openwrt/openwrt/pull/17097
Signed-off-by: Petr Štetiar <ynezz@true.cz>
| -rw-r--r-- | target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c index 5468fc0653..fe0980a1be 100644 --- a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c @@ -1492,7 +1492,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) priv->ds->needs_standalone_vlan_filtering = true; priv->dev = dev; - mutex_init(&priv->reg_mutex); + err = devm_mutex_init(dev, &priv->reg_mutex); + if (err) + return err; priv->family_id = soc_info.family; priv->id = soc_info.id; |