phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
Subsystems (2)
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")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/phy/samsung/phy-exynos5250-sata.c | 1 + 1 file changed, 1 insertion(+)
drivers/phy/samsung/phy-exynos5250-sata.c +1 -0
@@ -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
Quoted 9 lines · Miaoqian Lin
The
device_nodepointer is returned byof_parse_phandle()with refcount incremented. We should useof_node_put()on it when done.Fixes bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")Signed-off-by Miaoqian Lin <[email protected]>--- drivers/phy/samsung/phy-exynos5250-sata.c | 1 + 1 file changed, 1 insertion(+)
Reviewed-by Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof