Skip to content

Commit 1125ed4

Browse files
nehebrobimarko
authored andcommitted
realtek: rtl83xx: use devm for mutex_init
mutex_destroy is missing in remove. Signed-off-by: Rosen Penev <[email protected]> Link: openwrt/openwrt#16926 Signed-off-by: Robert Marko <[email protected]>
1 parent be3e7a8 commit 1125ed4

File tree

1 file changed

+3
-1
lines changed
  • target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx

1 file changed

+3
-1
lines changed

target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
14921492
priv->ds->needs_standalone_vlan_filtering = true;
14931493
priv->dev = dev;
14941494

1495-
mutex_init(&priv->reg_mutex);
1495+
err = devm_mutex_init(dev, &priv->reg_mutex);
1496+
if (err)
1497+
return err;
14961498

14971499
priv->family_id = soc_info.family;
14981500
priv->id = soc_info.id;

0 commit comments

Comments
 (0)