* [PATCH] pinctrl/rockchip: Fix refcount leak bug
@ 2022-06-19 7:33 ` Liang He
0 siblings, 0 replies; 6+ messages in thread
From: Liang He @ 2022-06-19 7:33 UTC (permalink / raw)
To: linus.walleij, heiko; +Cc: windhl, linux-gpio, linux-arm-kernel, linux-rockchip
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 <windhl@126.com>
---
drivers/pinctrl/pinctrl-rockchip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 32e41395fc76..d78827c97760 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] pinctrl/rockchip: Fix refcount leak bug
@ 2022-06-19 7:33 ` Liang He
0 siblings, 0 replies; 6+ messages in thread
From: Liang He @ 2022-06-19 7:33 UTC (permalink / raw)
To: linus.walleij, heiko; +Cc: windhl, linux-gpio, linux-arm-kernel, linux-rockchip
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 <windhl@126.com>
---
drivers/pinctrl/pinctrl-rockchip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 32e41395fc76..d78827c97760 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -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;
}
--
2.25.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] pinctrl/rockchip: Fix refcount leak bug
@ 2022-06-19 7:33 ` Liang He
0 siblings, 0 replies; 6+ messages in thread
From: Liang He @ 2022-06-19 7:33 UTC (permalink / raw)
To: linus.walleij, heiko; +Cc: windhl, linux-gpio, linux-arm-kernel, linux-rockchip
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 <windhl@126.com>
---
drivers/pinctrl/pinctrl-rockchip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 32e41395fc76..d78827c97760 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -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;
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] pinctrl/rockchip: Fix refcount leak bug
2022-06-19 7:33 ` Liang He
(?)
@ 2022-06-22 8:58 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-22 8:58 UTC (permalink / raw)
To: Liang He, linus.walleij, heiko
Cc: linux-gpio, linux-arm-kernel, linux-rockchip
On 19/06/2022 09:33, Liang He wrote:
> 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 <windhl@126.com>
> ---
> 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/202206221602.odN70SHs-lkp@intel.com/
[2]
https://lore.kernel.org/all/16f9a971.44e5.1817068ee3c.Coremail.windhl@126.com/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pinctrl/rockchip: Fix refcount leak bug
@ 2022-06-22 8:58 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-22 8:58 UTC (permalink / raw)
To: Liang He, linus.walleij, heiko
Cc: linux-gpio, linux-arm-kernel, linux-rockchip
On 19/06/2022 09:33, Liang He wrote:
> 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 <windhl@126.com>
> ---
> 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/202206221602.odN70SHs-lkp@intel.com/
[2]
https://lore.kernel.org/all/16f9a971.44e5.1817068ee3c.Coremail.windhl@126.com/
Best regards,
Krzysztof
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pinctrl/rockchip: Fix refcount leak bug
@ 2022-06-22 8:58 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-22 8:58 UTC (permalink / raw)
To: Liang He, linus.walleij, heiko
Cc: linux-gpio, linux-arm-kernel, linux-rockchip
On 19/06/2022 09:33, Liang He wrote:
> 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 <windhl@126.com>
> ---
> 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/202206221602.odN70SHs-lkp@intel.com/
[2]
https://lore.kernel.org/all/16f9a971.44e5.1817068ee3c.Coremail.windhl@126.com/
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-22 8:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-19 7:33 [PATCH] pinctrl/rockchip: Fix refcount leak bug Liang He
2022-06-19 7:33 ` Liang He
2022-06-19 7:33 ` Liang He
2022-06-22 8:58 ` Krzysztof Kozlowski
2022-06-22 8:58 ` Krzysztof Kozlowski
2022-06-22 8:58 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.