mirror of
https://github.com/openwrt/openwrt.git
synced 2024-11-23 09:56:19 +08:00
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>
This commit is contained in:
parent
be3e7a84bd
commit
1125ed408c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user