projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
031561c
)
net/dsa/hirschmann: Add missing of_node_get() in hellcreek_led_setup()
author
Liang He
<windhl@126.com>
Wed, 22 Jun 2022 04:06:21 +0000
(12:06 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:27 +0000
(17:53 +0200)
commit
16d584d2fc8f4ea36203af45a76becd7093586f1
upstream.
of_find_node_by_name() will decrease the refcount of its first arg and
we need a of_node_get() to keep refcount balance.
Fixes: 7d9ee2e8ff15 ("net: dsa: hellcreek: Add PTP status LEDs")
Signed-off-by: Liang He <windhl@126.com>
Link:
https://lore.kernel.org/r/20220622040621.4094304-1-windhl@126.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/hirschmann/hellcreek_ptp.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/hirschmann/hellcreek_ptp.c
b/drivers/net/dsa/hirschmann/hellcreek_ptp.c
index 2572c6087bb5a192756248410a380ffd8a391388..b28baab6d56a17bcc1bb44846aefcbcdff4a08d4 100644
(file)
--- a/
drivers/net/dsa/hirschmann/hellcreek_ptp.c
+++ b/
drivers/net/dsa/hirschmann/hellcreek_ptp.c
@@
-300,6
+300,7
@@
static int hellcreek_led_setup(struct hellcreek *hellcreek)
const char *label, *state;
int ret = -EINVAL;
+ of_node_get(hellcreek->dev->of_node);
leds = of_find_node_by_name(hellcreek->dev->of_node, "leds");
if (!leds) {
dev_err(hellcreek->dev, "No LEDs specified in device tree!\n");