net: dsa: Add missing master netdev dev_put() calls
Subsystems (3)
PATCH 4/6 net: dsa: Add missing master netdev dev_put() calls
Upon probe failure or unbinding, add missing dev_put() calls.
Signed-off-by Neil Armstrong <[email protected]>
--- net/dsa/dsa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/dsa/dsa.c +5 -1
@@ -931,8 +931,10 @@ static int dsa_probe(struct platform_device *pdev)platform_set_drvdata (pdev, dst); ret =dsa_setup_dst (dst, dev, &pdev->dev, pd); -if (ret) +if (ret) { +dev_put (dev); goto out; + }return 0 ;
@@ -965,6 +967,8 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)if (ds)dsa_switch_destroy (ds); } + +dev_put (dst->master_netdev); }static int dsa_remove (struct platform_device *pdev)
Signature · 1 line
1.9.1