projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0dc635
)
net: dsa: Add missing master netdev dev_put() calls
author
Neil Armstrong
<narmstrong@baylibre.com>
Mon, 7 Dec 2015 12:57:34 +0000
(13:57 +0100)
committer
David S. Miller
<davem@davemloft.net>
Mon, 7 Dec 2015 21:35:50 +0000
(16:35 -0500)
Upon probe failure or unbinding, add missing dev_put() calls.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
patch
|
blob
|
blame
|
history
diff --git
a/net/dsa/dsa.c
b/net/dsa/dsa.c
index d9e0172116b699c7527bf3bfe664089532931419..d22d303efd5c95f2c29c52c8202f506ad888af95 100644
(file)
--- a/
net/dsa/dsa.c
+++ b/
net/dsa/dsa.c
@@
-919,8
+919,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;
@@
-940,6
+942,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)