net/dsa/hirschmann: Add missing of_node_get() in hellcreek_led_setup()
PATCH 1/1 net/dsa/hirschmann: Add missing of_node_get() in hellcreek_led_setup()
of_find_node_by_name() will decrease the refcount of its first arg and we need a of_node_get() to keep refcount balance.
Signed-off-by Liang He <[email protected]>
--- drivers/net/dsa/hirschmann/hellcreek_ptp.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/dsa/hirschmann/hellcreek_ptp.c +1 -0
@@ -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" );
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Wed, 22 Jun 2022 12:06:21 +0800 you wrote:
of_find_node_by_name()will decrease the refcount of its first arg and we need aof_node_get()to keep refcount balance.Signed-off-by Liang He <[email protected]>--- drivers/net/dsa/hirschmann/hellcreek_ptp.c | 1 + 1 file changed, 1 insertion(+)
Here is the summary with links:
- net/dsa/hirschmann: Add missing of_node_get() in hellcreek_led_setup()
https://git.kernel.org/netdev/net/c/16d584d2fc8f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html