Skip to content

Commit

Permalink
phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
Browse files Browse the repository at this point in the history
[ Upstream commit 388ec8f ]

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

Fixes: bcff4cb ("PHY: Exynos: Add Exynos5250 SATA PHY driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220407091857.230386-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yuuoniy authored and gregkh committed May 9, 2022
1 parent 73c9e9a commit 30345e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/phy/samsung/phy-exynos5250-sata.c
Expand Up @@ -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;

Expand Down

0 comments on commit 30345e9

Please sign in to comment.