summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-rockchip.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-08-26 17:08:32 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-09-02 14:37:25 +0200
commitadad2e460e505a556f5ea6f0dc16fe95e62d5d76 (patch)
tree5db3278f720a3f7b3ffaed0f5b2077cd5ec8afb2 /drivers/gpio/gpio-rockchip.c
parentLinux 6.11-rc6 (diff)
downloadlinux-adad2e460e505a556f5ea6f0dc16fe95e62d5d76.tar.xz
linux-adad2e460e505a556f5ea6f0dc16fe95e62d5d76.zip
gpio: rockchip: fix OF node leak in probe()
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> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Link: https://lore.kernel.org/r/20240826150832.65657-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-rockchip.c')
-rw-r--r--drivers/gpio/gpio-rockchip.c1
1 files changed, 1 insertions, 0 deletions
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;