linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
@ 2022-03-09 12:48 Miaoqian Lin
  2022-03-09 16:50 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-03-09 12:48 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul, Krzysztof Kozlowski,
	Alim Akhtar, Miaoqian Lin, Girish K S, Vasanth Ananthan,
	Yuvaraj Kumar C D, linux-phy, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

The device_node pointer is returned by of_parse_phandle() with refcount
incremented. We should use of_node_put() on it when done.

Fixes: bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/phy/samsung/phy-exynos5250-sata.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/samsung/phy-exynos5250-sata.c b/drivers/phy/samsung/phy-exynos5250-sata.c
index 9ec234243f7c..6c305a3fe187 100644
--- a/drivers/phy/samsung/phy-exynos5250-sata.c
+++ b/drivers/phy/samsung/phy-exynos5250-sata.c
@@ -187,6 +187,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	sata_phy->client = of_find_i2c_device_by_node(node);
+	of_node_put(node);
 	if (!sata_phy->client)
 		return -EPROBE_DEFER;
 
-- 
2.17.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
  2022-03-09 12:48 [PATCH] phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe Miaoqian Lin
@ 2022-03-09 16:50 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-09 16:50 UTC (permalink / raw)
  To: Miaoqian Lin, Kishon Vijay Abraham I, Vinod Koul, Alim Akhtar,
	Girish K S, Vasanth Ananthan, Yuvaraj Kumar C D, linux-phy,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On 09/03/2022 13:48, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
> 
> Fixes: bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>  drivers/phy/samsung/phy-exynos5250-sata.c | 1 +
>  1 file changed, 1 insertion(+)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-09 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 12:48 [PATCH] phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe Miaoqian Lin
2022-03-09 16:50 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).