Fix following error:
OF: ERROR: memory leak, expected refcount 1 instead of 2,
of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
overlay node /soc/gpio@df020180
After finishing using device node got from of_mm_gpiochip_add_data(),
of_node_put() needs to be called. The refcount would be incremented in
of_mm_gpiochip_add_data.
Fixes: 5d07a692f9562 (gpio: gpiolib-of: Fix refcount bugs in
of_mm_gpiochip_add_data())
Signed-off-by: Haitao Liu <[email protected]>
---
drivers/gpio/gpio-altera.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index b7932ecc3b61..b78b05a18e61 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -308,6 +308,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
return ret;
}
+ of_node_put(node);
+
platform_set_drvdata(pdev, altera_gc);
return 0;
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13493):
https://lists.yoctoproject.org/g/linux-yocto/message/13493
Mute This Topic: https://lists.yoctoproject.org/mt/103804025/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-