Skip to contentSkip to conversation

phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe

PATCH In review Miaoqian Lin 2 participants 2 messages Mar 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe

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")
---
 drivers/phy/samsung/phy-exynos5250-sata.c | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/samsung/phy-exynos5250-sata.c +1 -0
index 9ec234243f7c..6c305a3fe187 100644
@@ -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;
 
Signature · 7 lines
2.17.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Miaoqian Lin

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")
---
 drivers/phy/samsung/phy-exynos5250-sata.c | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof