public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: rockchip: fix OF node leak in probe()
@ 2024-08-26 15:08 Krzysztof Kozlowski
  2024-09-02 10:23 ` Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26 15:08 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Heiko Stuebner, Jianqun Xu,
	linux-gpio, linux-arm-kernel, linux-rockchip, linux-kernel
  Cc: Krzysztof Kozlowski

Driver code is leaking OF node reference from of_get_parent() in
probe().

Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/gpio/gpio-rockchip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 0bd339813110..365ab947983c 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -713,6 +713,7 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	pctldev = of_pinctrl_get(pctlnp);
+	of_node_put(pctlnp);
 	if (!pctldev)
 		return -EPROBE_DEFER;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-02 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 15:08 [PATCH] gpio: rockchip: fix OF node leak in probe() Krzysztof Kozlowski
2024-09-02 10:23 ` Bartosz Golaszewski
2024-09-02 10:59   ` Krzysztof Kozlowski
2024-09-02 11:28 ` Heiko Stübner
2024-09-02 12:37 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox