Skip to content

Commit 1d776f0

Browse files
windhlgregkh
authored andcommitted
net/dsa/hirschmann: Add missing of_node_get() in hellcreek_led_setup()
commit 16d584d 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: 7d9ee2e ("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>
1 parent 031561c commit 1d776f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/dsa/hirschmann/hellcreek_ptp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ static int hellcreek_led_setup(struct hellcreek *hellcreek)
300300
const char *label, *state;
301301
int ret = -EINVAL;
302302

303+
of_node_get(hellcreek->dev->of_node);
303304
leds = of_find_node_by_name(hellcreek->dev->of_node, "leds");
304305
if (!leds) {
305306
dev_err(hellcreek->dev, "No LEDs specified in device tree!\n");

0 commit comments

Comments
 (0)