Skip to content

Commit 63ff545

Browse files
wangyufen316Bartosz Golaszewski
authored andcommitted
gpio/rockchip: fix refcount leak in rockchip_gpiolib_register()
The node returned by of_get_parent() with refcount incremented, of_node_put() needs be called when finish using it. So add it in the end of of_pinctrl_get(). Fixes: 936ee26 ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: Wang Yufen <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 45fecdb commit 63ff545

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpio/gpio-rockchip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
610610
return -ENODATA;
611611

612612
pctldev = of_pinctrl_get(pctlnp);
613+
of_node_put(pctlnp);
613614
if (!pctldev)
614615
return -ENODEV;
615616

0 commit comments

Comments
 (0)