Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Miaoqian Lin and committed by
Vinod Koul
388ec8f0 751ee15d

+1
+1
drivers/phy/samsung/phy-exynos5250-sata.c
··· 187 187 return -EINVAL; 188 188 189 189 sata_phy->client = of_find_i2c_device_by_node(node); 190 + of_node_put(node); 190 191 if (!sata_phy->client) 191 192 return -EPROBE_DEFER; 192 193