aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/samsung/phy-exynos5250-sata.c
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-04-07 11:18:56 +0200
committerVinod Koul <vkoul@kernel.org>2022-04-11 22:46:13 +0530
commit388ec8f079f2f20d5cd183c3bc6f33cbc3ffd3ef (patch)
tree34040be31b6a16fcfc00aae355bca4094ea694e6 /drivers/phy/samsung/phy-exynos5250-sata.c
parentphy: ti: Fix missing of_node_put in ti_pipe3_get_sysctrl() (diff)
downloadlinux-dev-388ec8f079f2f20d5cd183c3bc6f33cbc3ffd3ef.tar.xz
linux-dev-388ec8f079f2f20d5cd183c3bc6f33cbc3ffd3ef.zip
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 <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>
Diffstat (limited to 'drivers/phy/samsung/phy-exynos5250-sata.c')
-rw-r--r--drivers/phy/samsung/phy-exynos5250-sata.c1
1 files changed, 1 insertions, 0 deletions
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;