pinctrl/rockchip: Fix refcount leak bug
Subsystems (3)
PATCH 1/1 pinctrl/rockchip: Fix refcount leak bug
In rockchip_pinctrl_parse_groups(), we need a of_node_put() in each loop for the of_find_node_by_phandle() to keep the refcount balance.
Signed-off-by Liang He <[email protected]>
--- drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/pinctrl-rockchip.c +1 -0
@@ -2710,6 +2710,7 @@ static int rockchip_pinctrl_parse_groups(struct device_node *np, np_config =of_find_node_by_phandle (be32_to_cpup (phandle)); ret =pinconf_generic_parse_dt_config (np_config,NULL , &grp->data[j].configs, &grp->data[j].nconfigs); +of_node_put (np_config);if (ret)return ret; }
Signature · 1 line
2.25.1
Quoted 7 lines · Liang He
In
rockchip_pinctrl_parse_groups(), we need aof_node_put()in each loop for theof_find_node_by_phandle()to keep the refcount balance.Signed-off-by Liang He <[email protected]>--- drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+)
Before applying the patch please check it carefully. Previous evidence [1][2] suggests that not it was not even compiled.
[1] https://lore.kernel.org/all/[email protected]/
[2]
https://lore.kernel.org/all/[email protected]/
Best regards,
Krzysztof
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip