* [PATCH] phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
@ 2022-04-08 9:56 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-04-08 9:56 UTC (permalink / raw)
To: kishon, vkoul; +Cc: lv.ruyi, linux-phy, linux-kernel, Zeal Robot
From: Lv Ruyi <lv.ruyi@zte.com.cn>
of_parse_phandle() returns node pointer with refcount incremented, use
of_node_put() on it to decrease refcount when done.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
drivers/phy/ti/phy-ti-pipe3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
index 2cbc91e535d4..f502c36f3be5 100644
--- a/drivers/phy/ti/phy-ti-pipe3.c
+++ b/drivers/phy/ti/phy-ti-pipe3.c
@@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
}
control_pdev = of_find_device_by_node(control_node);
+ of_node_put(control_node);
if (!control_pdev) {
dev_err(dev, "Failed to get control device\n");
return -EINVAL;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
@ 2022-04-08 9:56 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-04-08 9:56 UTC (permalink / raw)
To: kishon, vkoul; +Cc: lv.ruyi, linux-phy, linux-kernel, Zeal Robot
From: Lv Ruyi <lv.ruyi@zte.com.cn>
of_parse_phandle() returns node pointer with refcount incremented, use
of_node_put() on it to decrease refcount when done.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
drivers/phy/ti/phy-ti-pipe3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
index 2cbc91e535d4..f502c36f3be5 100644
--- a/drivers/phy/ti/phy-ti-pipe3.c
+++ b/drivers/phy/ti/phy-ti-pipe3.c
@@ -696,6 +696,7 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
}
control_pdev = of_find_device_by_node(control_node);
+ of_node_put(control_node);
if (!control_pdev) {
dev_err(dev, "Failed to get control device\n");
return -EINVAL;
--
2.25.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
2022-04-08 9:56 ` cgel.zte
@ 2022-04-11 17:11 ` Vinod Koul
-1 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-04-11 17:11 UTC (permalink / raw)
To: cgel.zte; +Cc: kishon, lv.ruyi, linux-phy, linux-kernel, Zeal Robot
On 08-04-22, 09:56, cgel.zte@gmail.com wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> of_parse_phandle() returns node pointer with refcount incremented, use
> of_node_put() on it to decrease refcount when done.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl()
@ 2022-04-11 17:11 ` Vinod Koul
0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-04-11 17:11 UTC (permalink / raw)
To: cgel.zte; +Cc: kishon, lv.ruyi, linux-phy, linux-kernel, Zeal Robot
On 08-04-22, 09:56, cgel.zte@gmail.com wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> of_parse_phandle() returns node pointer with refcount incremented, use
> of_node_put() on it to decrease refcount when done.
Applied, thanks
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-11 17:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 9:56 [PATCH] phy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl() cgel.zte
2022-04-08 9:56 ` cgel.zte
2022-04-11 17:11 ` Vinod Koul
2022-04-11 17:11 ` Vinod Koul
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.